]> git.proxmox.com Git - pve-installer.git/blobdiff - unconfigured.sh
buildsys: switch upload dist over to buster
[pve-installer.git] / unconfigured.sh
index 0ad7e6b4cd1991b3d9cba486f2ff456ebe9accdc..674605f66259b62f7e9e0e7292bef065558b6930 100755 (executable)
@@ -38,16 +38,9 @@ real_reboot() {
     fi
     echo "done."
 
-    umount -l -n /dev/.static/dev
-    umount -l -n /dev
-
     umount -l -n /target >/dev/null 2>&1
-    umount -l -n /tmp
-    umount -l -n /var/tmp
-    umount -l -n /var/log
-    umount -l -n /var/run
-    umount -l -n /var/lib/xkb
-
+    umount -l -n /dev
+    umount -l -n /run
     umount -l -n /sys
     umount -l -n /proc
 
@@ -65,13 +58,12 @@ echo "Starting Proxmox installation"
 
 PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin
 
+# ensure udev isn't snippy and ignores our request
+export SYSTEMD_IGNORE_CHROOT=1
+
 mount -n -t proc proc /proc
-mount -n -t tmpfs tmpfs /tmp
-mount -n -t tmpfs tmpfs /var/tmp
-mount -n -t tmpfs tmpfs /var/log
-mount -n -t tmpfs tmpfs /var/run
-mount -n -t tmpfs tmpfs /var/lib/xkb
 mount -n -t sysfs sysfs /sys
+mount -n -t tmpfs tmpfs /run
 
 parse_cmdline
 
@@ -88,12 +80,21 @@ export RUNLEVEL=S
 export PREVLEVEL=N
 /etc/init.d/udev start
 
+mkdir -p /dev/shm
+mount -t tmpfs tmpfs /dev/shm
+
+if [ $proxdebug -ne 0 ]; then
+    echo "Dropping in debug shell inside chroot before starting installation"
+    echo "type exit or CTRL-D to start installation wizard"
+    debugsh
+fi
+
 # set the hostname 
 hostname proxmox
 
 # try to get ip config with dhcp
-echo -n "Detecting network settings... "
-/etc/init.d/networking start >/dev/tty2 2>&1
+echo -n "Attempting to get DHCP leases... "
+dhclient -v
 echo "done"
 
 xinit -- -dpi 96 >/dev/tty2 2>&1
@@ -108,6 +109,7 @@ fi
 
 echo "Installation done, rebooting... "
 #mdadm -S /dev/md0 >/dev/tty2 2>&1
+kill $(pidof dhclient) 2>&1 > /dev/null
 real_reboot
 
 # never reached