fixed /data paths
This commit is contained in:
parent
8dfa7e146a
commit
a320d42d51
|
@ -133,8 +133,8 @@ mount -o bind /sysroot/data/var /sysroot/var
|
|||
mount -o bind /sysroot/data/home /sysroot/home
|
||||
|
||||
for i in passwd shadow group gshadow subuid subgid; do
|
||||
[[ -f /sysroot/data/var/$i ]] && continue
|
||||
cp -a /sysroot/usr/share/factory/data/var/$i /sysroot/data/var/$i
|
||||
[[ -f /sysroot/var/$i ]] && continue
|
||||
cp -a /sysroot/usr/share/factory/var/$i /sysroot/var/$i
|
||||
done
|
||||
|
||||
chroot /sysroot /usr/bin/systemd-tmpfiles --create --remove --boot --exclude-prefix=/dev --exclude-prefix=/run --exclude-prefix=/tmp --exclude-prefix=/etc 2>&1 | vinfo
|
||||
|
|
|
@ -288,10 +288,7 @@ rm "$sysroot"/pre-pivot.sh
|
|||
|
||||
umount "$sysroot"/var/cache/dnf
|
||||
|
||||
mkdir -p "$sysroot"/usr/share/factory/data/{var/etc,home}
|
||||
ln -sfnr "$sysroot"/usr/share/factory/data/var "$sysroot"/usr/share/factory/var
|
||||
ln -sfnr "$sysroot"/usr/share/factory/data/home "$sysroot"/usr/share/factory/home
|
||||
|
||||
mkdir -p "$sysroot"/usr/share/factory/{var/etc,home}
|
||||
|
||||
chroot "$sysroot" update-ca-trust
|
||||
|
||||
|
@ -453,7 +450,7 @@ rm -fr "$sysroot"/var/tmp/*
|
|||
rm -fr "$sysroot"/etc/systemd/system/network-online.target.wants
|
||||
mv "$sysroot"/lib/tmpfiles.d/var.conf "$sysroot"/lib/tmpfiles.d-var.conf
|
||||
chroot "$sysroot" bash -c 'for i in $(find -H /var -xdev -type d); do grep " $i " -r -q /lib/tmpfiles.d && ! grep " $i " -q /lib/tmpfiles.d-var.conf && rm -vfr --one-file-system "$i" ; done; :'
|
||||
cp -avxr "$sysroot"/var/* "$sysroot"/usr/share/factory/data/var/
|
||||
cp -avxr "$sysroot"/var/* "$sysroot"/usr/share/factory/var/
|
||||
rm -fr "$sysroot"/usr/share/factory/var/{run,lock}
|
||||
|
||||
chroot "$sysroot" bash -c 'for i in $(find -H /var -xdev -type d); do echo "C $i - - - - -"; done > /usr/lib/tmpfiles.d/var-quirk.conf; :'
|
||||
|
|
|
@ -39,12 +39,12 @@ cp -avxr "$sysroot"/etc/skel "$sysroot"/usr/share/factory/home/admin
|
|||
chown -R +1000.+1000 "$sysroot"/usr/share/factory/home/admin
|
||||
|
||||
cat > "$sysroot"/usr/lib/tmpfiles.d/home.conf <<EOF
|
||||
C /data/home/admin - - - - -
|
||||
C /data/var/passwd - - - - -
|
||||
C /data/var/shadow - - - - -
|
||||
C /data/var/group - - - - -
|
||||
C /data/var/gshadow - - - - -
|
||||
C /data/var/subuid - - - - -
|
||||
C /data/var/subgid - - - - -
|
||||
C /data/var/etc - - - - -
|
||||
C /home/admin - - - - -
|
||||
C /var/passwd - - - - -
|
||||
C /var/shadow - - - - -
|
||||
C /var/group - - - - -
|
||||
C /var/gshadow - - - - -
|
||||
C /var/subuid - - - - -
|
||||
C /var/subgid - - - - -
|
||||
C /var/etc - - - - -
|
||||
EOF
|
||||
|
|
|
@ -41,12 +41,12 @@ cp -avxr "$sysroot"/etc/skel "$sysroot"/usr/share/factory/home/admin
|
|||
chown -R +1000.+1000 "$sysroot"/usr/share/factory/home/admin
|
||||
|
||||
cat > "$sysroot"/usr/lib/tmpfiles.d/home.conf <<EOF
|
||||
C /data/home/admin - - - - -
|
||||
C /data/var/passwd - - - - -
|
||||
C /data/var/shadow - - - - -
|
||||
C /data/var/group - - - - -
|
||||
C /data/var/gshadow - - - - -
|
||||
C /data/var/subuid - - - - -
|
||||
C /data/var/subgid - - - - -
|
||||
C /data/var/etc - - - - -
|
||||
C /home/admin - - - - -
|
||||
C /var/passwd - - - - -
|
||||
C /var/shadow - - - - -
|
||||
C /var/group - - - - -
|
||||
C /var/gshadow - - - - -
|
||||
C /var/subuid - - - - -
|
||||
C /var/subgid - - - - -
|
||||
C /var/etc - - - - -
|
||||
EOF
|
||||
|
|
|
@ -20,12 +20,12 @@ cp -avxr "$sysroot"/etc/skel "$sysroot"/usr/share/factory/home/admin
|
|||
chown -R +1000.+1000 "$sysroot"/usr/share/factory/home/admin
|
||||
|
||||
cat > "$sysroot"/usr/lib/tmpfiles.d/home.conf <<EOF
|
||||
C /data/home/admin - - - - -
|
||||
C /data/var/passwd - - - - -
|
||||
C /data/var/shadow - - - - -
|
||||
C /data/var/group - - - - -
|
||||
C /data/var/gshadow - - - - -
|
||||
C /data/var/subuid - - - - -
|
||||
C /data/var/subgid - - - - -
|
||||
C /data/var/etc - - - - -
|
||||
C /home/admin - - - - -
|
||||
C /var/passwd - - - - -
|
||||
C /var/shadow - - - - -
|
||||
C /var/group - - - - -
|
||||
C /var/gshadow - - - - -
|
||||
C /var/subuid - - - - -
|
||||
C /var/subgid - - - - -
|
||||
C /var/etc - - - - -
|
||||
EOF
|
||||
|
|
Loading…
Reference in a new issue