summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Cady <d@cryptonomic.net>2020-10-29 23:21:42 -0400
committerAndrew Cady <d@cryptonomic.net>2020-10-29 23:21:42 -0400
commit8ee32173467ca4185818cf7f577209178b8fcc74 (patch)
tree452d5279c190e86335355d309bb458cb696d5247
parent9a884151852eafa00889e414b381b3defbf1be16 (diff)
selfstrap: bind mount /dev in chroot
-rwxr-xr-xselfstrap2
1 files changed, 2 insertions, 0 deletions
diff --git a/selfstrap b/selfstrap
index 0535e42..a127d8f 100755
--- a/selfstrap
+++ b/selfstrap
@@ -158,6 +158,7 @@ prepare_chroot()
158 [ -d "$TARGET"/sys ] || mkdir "$TARGET"/sys 158 [ -d "$TARGET"/sys ] || mkdir "$TARGET"/sys
159 mount -t proc proc "$TARGET"/proc 159 mount -t proc proc "$TARGET"/proc
160 mount -t sysfs sysfs "$TARGET"/sys 160 mount -t sysfs sysfs "$TARGET"/sys
161 mount --bind /dev "$TARGET"/dev
161} 162}
162 163
163cleanup_chroot() 164cleanup_chroot()
@@ -165,6 +166,7 @@ cleanup_chroot()
165 [ "$TARGET" ] || die 'no $TARGET' 166 [ "$TARGET" ] || die 'no $TARGET'
166 umount "$TARGET"/proc || fail=y 167 umount "$TARGET"/proc || fail=y
167 umount "$TARGET"/sys || fail=y 168 umount "$TARGET"/sys || fail=y
169 umount "$TARGET"/dev || fail=y
168 [ ! "$fail" ] 170 [ ! "$fail" ]
169} 171}
170 172