]> git.ipfire.org Git - ipfire-2.x.git/blame - src/installer/dracut-module/run-installer.sh
installer: Drop user to an emergency shell if the installer crashes.
[ipfire-2.x.git] / src / installer / dracut-module / run-installer.sh
CommitLineData
5fca8d27 1#!/bin/sh
6cf9e770
AF
2#
3# IPFire Installer RC
4#
5
5fca8d27 6# Silence the kernel
6cf9e770
AF
7echo >/proc/sys/kernel/printk "1 4 1 7"
8echo -n -e "\033[9;0]"
9
6cf9e770
AF
10echo "Starting shells on tty2 and tty3 ..."
11/usr/local/bin/iowrap /dev/tty2 /bin/bash &
12/usr/local/bin/iowrap /dev/tty3 /bin/bash &
13
14echo "Loading Installer..."
5fca8d27 15/bin/bash --login -c "/usr/bin/installer /dev/tty2"
39a36d7d 16ret=$?
5fca8d27 17
39a36d7d
MT
18case "${ret}" in
19 0)
20 # The installer has finished without a problem.
21 ;;
22 *)
23 echo "The installer has crashed. You will be dropped to a debugging shell"
24 /bin/bash --login
25 ;;
26esac
6cf9e770 27
5fca8d27
MT
28# Reboot the system
29/shutdown reboot