calamares/calamares-install-setup
2015-04-21 23:56:56 +02:00

49 lines
910 B
Bash

#!/bin/sh
# tpgxyz@gmail.com
if grep -q '\bsystemd.unit=calamares.target\b' /proc/cmdline; then
. /etc/locale.conf
# ensure plymouth really has stopped
if pgrep "plymouthd" > /dev/null 2>&1; then
/bin/plymouth quit --retain-splash
fi
/bin/systemctl stop crond.service &
xset -dpms
xset s off
if [ -x /usr/bin/openbox ]; then
/usr/bin/openbox &
else
echo "openbox not found. Exiting."
sleep 30
reboot
fi
sleep 1
if [ "$(pidof openbox)" ]; then
# setup background
if [ -e /usr/share/mdk/backgrounds/default.png ] && [ -f /usr/bin/xli ]; then
/usr/bin/xli -onroot -fullscreen /usr/share/mdk/backgrounds/default.png &
fi
/usr/bin/calamares
sleep 1
else
echo "Can not start calamares. Rebooting..."
sleep 5
fi
# check if we are booted from cd drom to eject it
blkid /dev/sr0 >/dev/null 2>&1
if [[ $? -eq 0 ]]; then
eject
sleep 10
fi
sync
reboot
fi