diff options
Diffstat (limited to 'selfstrap')
-rwxr-xr-x | selfstrap | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -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 | ||
186 | cleanup_chroot() | 188 | cleanup_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 | ||