[Initng-svn] r1974 - in initng: . initfiles/system scripts
scripts/net scripts/splash
svn at initng.thinktux.net
svn at initng.thinktux.net
Mon Nov 7 16:14:53 CET 2005
Author: SaTaN0r1
Date: Mon Nov 7 16:14:50 2005
New Revision: 1974
Added:
initng/scripts/splash/
initng/scripts/splash/Makefile.am
initng/scripts/splash/fbsplash.sh (contents, props changed)
Modified:
initng/configure.in
initng/initfiles/system/splash.ii
initng/scripts/Makefile.am
initng/scripts/net/interface
Log:
Changed scripts/net/interface so it will look for /usr/sbin/udhcpc and /sbin/udhcpc; changed splash script to support themes with scripts
Modified: initng/configure.in
==============================================================================
--- initng/configure.in (original)
+++ initng/configure.in Mon Nov 7 16:14:50 2005
@@ -358,6 +358,7 @@
doc/Makefile \
fixes/Makefile \
tools/Makefile \
+ scripts/splash/Makefile \
scripts/net/Makefile \
scripts/Makefile \
initfiles/net/Makefile \
Modified: initng/initfiles/system/splash.ii
==============================================================================
--- initng/initfiles/system/splash.ii (original)
+++ initng/initfiles/system/splash.ii Mon Nov 7 16:14:50 2005
@@ -1,111 +1,18 @@
service system/splash/start {
need = system/initial
- start {
- get_paint_cmd(){
- res="`/lib/splash/bin/fbres`"
- xres="${res%x*}"
- has_text="no"
-
- eval `cat ${themedir}/${theme}/${res}.cfg | grep "^text_[a-z]\+="`
-
- [[ -n "${text_x}" && -n "${text_y}" && -n "${text_size}" ]] && has_text="yes"
- [ ${has_text} == "yes" ] && echo ",cmd:paint rect ${text_x} ${text_y} ${xres} $(($text_y+5*$text_size))"
- }
-
- spl_comm(){
- echo "$*" > /lib/splash/cache/.splash
- }
-
- [ -z "$(grep 'splash=' /proc/cmdline)" ] && exit 0
- [ ! -e "/dev/fbsplash" ] && exit 0
- SPLASHOPTS="$(sed -e 's/.*splash=//g' -e 's/ .*//g' < /proc/cmdline)"
- MODE="verbose"
- [ ! -z "$(echo ${SPLASHOPTS} | grep silent)" ] && MODE="silent"
- THEME="$(echo ${SPLASHOPTS} | sed -e 's/.*theme://g' -e 's/,.*//g' )"
-
- killall -9 splash_util 2> /dev/null
-
- if [ "${MODE}" == "verbose" ]; then
- splash_util -c setcfg -t ${THEME}
- splash_util -c setpic -t ${THEME}
- splash_util -c on
- exit 0
- fi
-
- splash_util -d -t ${THEME}
-
- spl_comm 'set message Initng Booting ($progress%) ... Press F2 for verbose'
- spl_comm "set mode silent"
- spl_comm "repaint"
-
- ngc -S "gensplash,boot`get_paint_cmd`"
- }
- stop {
- get_paint_cmd(){
- res="`/lib/splash/bin/fbres`"
- xres="${res%x*}"
- has_text="no"
-
- eval `cat ${themedir}/${theme}/${res}.cfg | grep "^text_[a-z]\+="`
-
- [[ -n "${text_x}" && -n "${text_y}" && -n "${text_size}" ]] && has_text="yes"
- [ ${has_text} == "yes" ] && echo ",cmd:paint rect ${text_x} ${text_y} ${xres} $(($text_y+5*$text_size))"
- }
-
- spl_comm(){
- echo "$*" > /lib/splash/cache/.splash
- }
-
- [ -z "$(grep 'splash=' /proc/cmdline)" ] && exit 0
- [ ! -e "/dev/fbsplash" ] && exit 0
- SPLASHOPTS="$(sed -e 's/.*splash=//g' -e 's/ .*//g' < /proc/cmdline)"
- MODE="verbose"
- [ ! -z "$(echo ${SPLASHOPTS} | grep silent)" ] && MODE="silent"
- THEME="$(echo ${SPLASHOPTS} | sed -e 's/.*theme://g' -e 's/,.*//g' )"
-
- killall -9 splash_util 2> /dev/null
-
- #change VT
-
- chvt 1
-
- if [ "${MODE}" == "verbose" ]; then
- splash_util -c setcfg -t ${THEME}
- splash_util -c setpic -t ${THEME}
- splash_util -c on
- exit 0
- fi
-
- splash_util -d -t ${THEME}
-
- spl_comm 'set message Initng Stopping ($progress%) ... Press F2 for verbose'
- spl_comm "set mode silent"
- spl_comm "repaint"
-
- ngc -S "gensplash,shutdown`get_paint_cmd`"
- }
-
+ start = /lib/initng/scripts/splash/fbsplash.sh
+ start_args = start
+ stop = /lib/initng/scripts/splash/fbsplash.sh
+ stop_args = shutdown
}
service system/splash/stop {
need = system/initial
- start {
-
- killall -9 splash_util 2> /dev/null
-
- ngc -S off
-
- [ -z "$(grep 'splash=' /proc/cmdline)" ] && exit 0
- [ ! -z "/dev/fpsplash" ] && exit 0
- SPLASHOPTS="$(sed -e 's/.*splash=//g' -e 's/ .*//g' < /proc/cmdline)"
- THEME="$(echo ${SPLASHOPTS} | sed -e 's/.*theme://g' -e 's/,.*//g' )"
- splash_util -c setcfg -t ${THEME}
- splash_util -c setpic -t ${THEME}
- splash_util -c on
- exit 0
- }
+ last
+ start = /lib/initng/scripts/splash/fbsplash.sh
+ start_args = stop
}
-service system/splash {
- need = system/initial system/splash/start
+virtual system/splash {
+ need = system/initial system/splash/start system/splash/stop
}
Modified: initng/scripts/Makefile.am
==============================================================================
--- initng/scripts/Makefile.am (original)
+++ initng/scripts/Makefile.am Mon Nov 7 16:14:50 2005
@@ -1 +1,2 @@
-SUBDIRS = net
\ No newline at end of file
+SUBDIRS = splash net
+
Modified: initng/scripts/net/interface
==============================================================================
--- initng/scripts/net/interface (original)
+++ initng/scripts/net/interface Mon Nov 7 16:14:50 2005
@@ -7,7 +7,7 @@
}
dhcp_start() {
- if [[ -x /usr/sbin/udhcpc && ${mods} == *' udhcpc '* ]]; then
+ if [[ ( -x /usr/sbin/udhcpc || -x /sbin/udhcpc ) && ${mods} == *' udhcpc '* ]]; then
ngc -u "daemon/udhcpc/$1"
elif [[ -x /sbin/dhclient && ${mods} == *' dhclient '* ]]; then
ngc -u "daemon/dhclient/$1"
@@ -15,7 +15,7 @@
ngc -u "daemon/pump/$1"
elif [[ -x /sbin/dhcpcd ]]; then
ngc -u "daemon/dhcpcd/$1"
- elif [[ -x /usr/sbin/udhcpc ]]; then
+ elif [[ -x /usr/sbin/udhcpc || -x /sbin/udhcpc ]]; then
ngc -u "daemon/udhcpc/$1"
elif [[ -x /sbin/dhclient ]]; then
ngc -u "daemon/dhclient/$1"
More information about the Initng-svn
mailing list