summaryrefslogtreecommitdiff
path: root/selfstrap
diff options
context:
space:
mode:
Diffstat (limited to 'selfstrap')
-rwxr-xr-xselfstrap3
1 files changed, 3 insertions, 0 deletions
diff --git a/selfstrap b/selfstrap
index 3521bb2..4aa6ef9 100755
--- a/selfstrap
+++ b/selfstrap
@@ -181,6 +181,8 @@ prepare_chroot()
181 mountpoint -q "$TARGET"/proc || mount -t proc proc "$TARGET"/proc 181 mountpoint -q "$TARGET"/proc || mount -t proc proc "$TARGET"/proc
182 mountpoint -q "$TARGET"/sys || mount -t sysfs sysfs "$TARGET"/sys 182 mountpoint -q "$TARGET"/sys || mount -t sysfs sysfs "$TARGET"/sys
183 mountpoint -q "$TARGET"/dev || mount --bind /dev "$TARGET"/dev 183 mountpoint -q "$TARGET"/dev || mount --bind /dev "$TARGET"/dev
184 [ -e "$TARGET"/etc/resolv.conf ] || touch "$TARGET"/etc/resolv.conf
185 mountpoint -q "$TARGET"/etc/resolv.conf || mount --bind /etc/resolv.conf "$TARGET"/etc/resolv.conf
184} 186}
185 187
186cleanup_chroot() 188cleanup_chroot()
@@ -189,6 +191,7 @@ cleanup_chroot()
189 umount "$TARGET"/proc || fail=y 191 umount "$TARGET"/proc || fail=y
190 umount "$TARGET"/sys || fail=y 192 umount "$TARGET"/sys || fail=y
191 umount "$TARGET"/dev || fail=y 193 umount "$TARGET"/dev || fail=y
194 umount "$TARGET"/etc/resolv.conf || fail=y
192 [ ! "$fail" ] 195 [ ! "$fail" ]
193} 196}
194 197