summaryrefslogtreecommitdiffstats
path: root/source/installer/build_installer.sh
diff options
context:
space:
mode:
Diffstat (limited to 'source/installer/build_installer.sh')
-rwxr-xr-xsource/installer/build_installer.sh15
1 files changed, 15 insertions, 0 deletions
diff --git a/source/installer/build_installer.sh b/source/installer/build_installer.sh
index e980207a2..755efe47d 100755
--- a/source/installer/build_installer.sh
+++ b/source/installer/build_installer.sh
@@ -1003,7 +1003,22 @@ rm -f $PKG/$ARCH-installer-filesystem/sbin/reboot
( cd $PKG/$ARCH-installer-filesystem/bin ; ln -sf busybox reboot )
cat << EOF > $PKG/$ARCH-installer-filesystem/sbin/reboot
#!/bin/sh
+echo "Sending all processes the SIGTERM signal."
+/sbin/killall5 -15
+/bin/sleep 2
+echo "Sending all processes the SIGKILL signal."
+/sbin/killall5 -9
+/bin/sleep 2
+echo "Syncing filesystems."
sync
+echo "Unmounting filesystems:"
+# Try to unmount these bind mounts first to prevent them from blocking unmount of the target /:
+umount /mnt/dev 2> /dev/null
+umount /mnt/proc 2> /dev/null
+umount /mnt/sys 2> /dev/null
+/bin/umount -v -a -t no,proc,sysfs,devtmpfs,fuse.gvfsd-fuse,tmpfs
+sync
+echo "Rebooting."
if [ -z "\$*" ]; then
/bin/reboot -f
else