kiss-chroot: Allow some things to fail.

This commit is contained in:
Dylan Araps 2020-07-31 09:53:52 +03:00
parent af24f9bd29
commit 5c6898f143
No known key found for this signature in database
GPG Key ID: 46D62DD9F1DE636E
1 changed files with 4 additions and 4 deletions

View File

@ -45,16 +45,16 @@ mounted() {
trap 'clean "$1"' EXIT INT
log Mounting /dev, /proc and /sys from host; {
mounted "$1/dev" || mount -o bind /dev "$1/dev"
mounted "$1/proc" || mount -t proc proc "$1/proc"
mounted "$1/sys" || mount -t sysfs sys "$1/sys"
mounted "$1/dev" || mount -o bind /dev "$1/dev" ||:
mounted "$1/proc" || mount -t proc proc "$1/proc" ||:
mounted "$1/sys" || mount -t sysfs sys "$1/sys" ||:
mounted "$1/sys/firmware/efi/efivars" ||
mount -t efivarfs efivarfs "$1/sys/firmware/efi/efivars" 2>/dev/null ||:
}
log Copying /etc/resolv.conf from host; {
cp -f /etc/resolv.conf "$1/etc"
cp -f /etc/resolv.conf "$1/etc" ||:
}
log Entering chroot; {