Browse Source

More reliable enter.sh

tags/nilmdbuntu-4
Jim Paris 7 years ago
parent
commit
3618d9815f
1 changed files with 6 additions and 2 deletions
  1. +6
    -2
      enter.sh

+ 6
- 2
enter.sh View File

@@ -27,6 +27,10 @@ run() {
}

set -e
umount ${FS}/dev/pts || true
umount ${FS}/sys/kernel/security || true
umount ${FS}/sys || true
umount ${FS}/proc || true
mount -t proc none ${FS}/proc
mount -t sysfs none ${FS}/sys
mount -t devpts none ${FS}/dev/pts
@@ -34,9 +38,9 @@ mount -t devpts none ${FS}/dev/pts
run "echo 'nameserver 8.8.8.8' > /etc/resolv.conf"
run "dbus-uuidgen > /var/lib/dbus/machine-id"
run "dpkg-divert --local --rename --add /sbin/initctl"
run "ln -s /bin/true /sbin/initctl"
run "ln -sf /bin/true /sbin/initctl"
run "dpkg-divert --local --rename --add /usr/sbin/update-grub"
run "ln -s /bin/true /usr/sbin/update-grub"
run "ln -sf /bin/true /usr/sbin/update-grub"

set +e
if [ -z "$1" ] ; then


Loading…
Cancel
Save