diff options
author | toni <matzeton@googlemail.com> | 2016-11-23 09:10:23 +0100 |
---|---|---|
committer | toni <matzeton@googlemail.com> | 2016-11-23 09:10:23 +0100 |
commit | 9ff1ab6b8e51a7e31a4ed6dfa03a853a62530b7d (patch) | |
tree | 93a580fcd2d9314f7f9280bc2d5c55564c1c631b | |
parent | 11b6c945957a4e098a75c9c4ba585258d602bdbc (diff) |
/root homedir creation during initramfs hooks
-rwxr-xr-x | scripts/naskpass.inithook | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/scripts/naskpass.inithook b/scripts/naskpass.inithook index aaf6e7b..9f7eaf5 100755 --- a/scripts/naskpass.inithook +++ b/scripts/naskpass.inithook @@ -27,6 +27,12 @@ copy_exec /usr/share/naskpass/naskpass.initconf /etc/naskpass.conf copy_exec /usr/sbin/sshd /sbin/sshd cp -R /etc/initramfs-tools/etc/ssh "${DESTDIR}/etc/" +if [ ! -r "${DESTDIR}/root" ]; then + mkdir -p "${DESTDIR}/root" + chown root:root "${DESTDIR}/root" + chmod 0700 "${DESTDIR}/root" +fi + copy_exec /usr/lib/$(dpkg-architecture -q DEB_HOST_MULTIARCH)/libnss_compat.so /usr/lib/$(dpkg-architecture -q DEB_HOST_MULTIARCH)/ if [ -r "${DESTDIR}/etc/nsswitch.conf" ]; then echo "passwd: compat" > "${DESTDIR}/etc/nsswitch.conf" |