EOF
getcols() {
echo "\$2";
}
if [ "\$1" = "fail" ]; then
IN="31m!!";
else
IN="32mok";
fi
COLS="60stty size 2> /dev/
null60?";
COLS="60getcols \${COLS}60";
COLS=\$
- 7∞;
echo -e "\e[A\e[\${COLS}G\e[1;34m [ \e[1;\$IN \e[1;34m]\e[0m";
EOF
perl -pi -e "s/60/\`/" /bin/okfail
perl -pi -e "s/60/\`/" /bin/okfail
chmod +x /bin/okfail
:code:
älteste bekannte Version dieser Seite wurde bearbeitet am 2005-06-28 12:19:00 von SeverinM [ ]
Thanks to Stefan Schweizer (aka stef) for the script. Simply paste the code below into a script called, say, color-boot.sh. Next set it executable and run it:
sux
<root password>
chmod +x color-boot.sh
./color-boot.sh
Now for the script:
:code:(php)
#/bin/sh
# Improve the eyecandy by graphical boot
# . are replaced by [ OK ] and ok is moved to the right
# * is displayed before starting the service
# if not starting or fail ! and !! is displayed, but you cannot rely on it for now
#
# Stefan Schweizer stefan-schweizer@gmx.de
# Licence: GPL
#
#
perl -pi -e 's|\"([^*]*)(Not starting)|\"\e[1;31m ! \e[0m\2|' /etc/init.d/*
perl -pi -e "s|\'([^*]*)(Not starting)|\'\e[1;31m ! \e[0m\2|" /etc/init.d/*
perl -pi -e 's/\"([^*]*)(Starting|Restarting|Loading|Running|Reloading|Restoring|Setting|Stopping|Shutting|Storing|Cleaning|Creating|Continuing|Mounting|Trying)/\"\e[1;32m * \e[0m\2/' /etc/init.d/*
perl -pi -e "s/\'([^*]*)(Starting|Restarting|Loading|Running|Reloading|Restoring|Setting|Stopping|Shutting|Storing|Cleaning|Creating|Continuing|Mounting|Trying)/\'\e[1;32m * \e[0m\2/" /etc/init.d/*
perl -pi -e 's/(\s)(echo|printf|msg)([^\.]*(not|fail)[^\.]*)\.+(")([^>]*$)/\1\2\3\5; echo "\x60\x2fbin\x2fokfail fail\x60" \6/' /etc/init.d/*
perl -pi -e "s/(\s)(echo|printf|msg)([^\.]*(not|fail)[^\.]*)\.+(')([^>]*$)/\1\2\3\5; echo '\x60\x2fbin\x2fokfail fail\x60' \6/" /etc/init.d/*
perl -pi -e 's/(\s)(echo|printf|msg)([^\.]*)\.+(")([^>]*$)/\1\2\3\4; echo "\x60\x2fbin\x2fokfail ok\x60" \5/' /etc/init.d/*
perl -pi -e "s/(\s)(echo|printf|msg)([^\.]*)\.+(')([^>]*$)/\1\2\3\4; echo '\x60\x2fbin\x2fokfail ok\x60' \5/" /etc/init.d/*
cat > /bin/okfail
EOF
Letzter Editor :
Eigentümer :