mirror of
https://git.launchpad.net/livecd-rootfs
synced 2025-02-23 11:21:12 +00:00
auto/build: use setup|teardown_mountpoint to reduce duplication
This commit is contained in:
parent
9c52eaef60
commit
109e6c6613
@ -106,33 +106,17 @@ fi
|
||||
Setup_cleanup
|
||||
|
||||
preinstall_snaps() {
|
||||
lb chroot_resolv install
|
||||
setup_mountpoint chroot
|
||||
|
||||
snap_prepare chroot
|
||||
|
||||
for snap in "$@"; do
|
||||
SNAP_NO_VALIDATE_SEED=1 snap_preseed chroot "${snap}"
|
||||
done
|
||||
|
||||
if [ ! -c /dev/mem ]; then
|
||||
mknod -m 660 /dev/mem c 1 1
|
||||
chown root:kmem /dev/mem
|
||||
fi
|
||||
|
||||
mount --rbind /dev chroot/dev
|
||||
mount --bind /sys chroot/sys
|
||||
mount --bind /sys/kernel/security chroot/sys/kernel/security
|
||||
mount --bind /proc chroot/proc
|
||||
# Provide more up to date apparmor features, matching target kernel
|
||||
mount -o bind /usr/share/livecd-rootfs/live-build/apparmor/generic chroot/sys/kernel/security/apparmor/features
|
||||
mount -o bind /usr/share/livecd-rootfs/live-build/seccomp/generic.actions_avail chroot/proc/sys/kernel/seccomp/actions_avail
|
||||
|
||||
snap_validate_seed chroot
|
||||
|
||||
umount --recursive chroot/proc
|
||||
umount --recursive chroot/sys
|
||||
umount --recursive chroot/dev
|
||||
|
||||
lb chroot_resolv remove
|
||||
teardown_mountpoint chroot
|
||||
}
|
||||
|
||||
rm -f binary.success
|
||||
|
Loading…
x
Reference in New Issue
Block a user