From 7d149c2c0ab60531a914af4b149700ef3deeb86e Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Tue, 18 Sep 2018 19:02:09 +0200 Subject: [PATCH] use /var/roothome as /root --- prepare-root.sh | 2 +- quirks/nss.sh | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/prepare-root.sh b/prepare-root.sh index 5e9ae17..6b7f695 100755 --- a/prepare-root.sh +++ b/prepare-root.sh @@ -513,7 +513,7 @@ if [[ -d "$sysroot"/boot/efi/EFI/fedora ]]; then fi rm -fr "$sysroot"/{boot,root} -ln -sfnr "$sysroot"/var/root "$sysroot"/root +ln -sfnr "$sysroot"/var/roothome "$sysroot"/root mkdir "$sysroot"/efi rm -fr "$sysroot"/var rm -fr "$sysroot"/home diff --git a/quirks/nss.sh b/quirks/nss.sh index 6a796dd..2bb64c4 100644 --- a/quirks/nss.sh +++ b/quirks/nss.sh @@ -5,6 +5,7 @@ sed -i -e 's#^\(passwd:.*\) files#\1 files altfiles db#g;s#^\(shadow:.*\) files#\1 files altfiles db#g;s#^\(group:.*\) files#\1 files altfiles db#g' \ "$sysroot"/etc/nsswitch.conf + mkdir -p "$sysroot"/usr/db sed -i -e 's#/var/db#/usr/db#g' "$sysroot"/lib*/libnss_db-2*.so "$sysroot"/var/db/Makefile @@ -13,7 +14,7 @@ egrep -e '^(adm|wheel):.*' "$sysroot"/etc/gshadow > "$sysroot"/etc/gshadow.adm chmod --reference="$sysroot"/etc/group "$sysroot"/etc/group.adm chmod --reference="$sysroot"/etc/gshadow "$sysroot"/etc/gshadow.adm -sed -i -e 's#:/root:#:/var/root:#g' "$sysroot"/etc/passwd +sed -i -e 's#:/root:#:/var/roothome:#g' "$sysroot"/etc/passwd sed -i -e '/^wheel:.*/d;/^adm:.*/d' "$sysroot"/etc/group "$sysroot"/etc/gshadow @@ -66,11 +67,11 @@ sed -i -e 's#/etc/.pwd.lock#/cfg/.pwd.lock#g' \ && sed -i -e 's#/etc/.pwd.lock#/cfg/.pwd.lock#g' \ "$sysroot"/usr/lib*/librpmostree-1.so.1 -mkdir -p "$sysroot"/usr/share/factory/var/root -chown +0.+0 "$sysroot"/usr/share/factory/var/root +mkdir -p "$sysroot"/usr/share/factory/var/roothome +chown +0.+0 "$sysroot"/usr/share/factory/var/roothome cat > "$sysroot"/usr/lib/tmpfiles.d/home.conf <