From 1b9906de1e3b06d1c6442361200f8b1348c66152 Mon Sep 17 00:00:00 2001 From: James Meyer Date: Thu, 1 Sep 2011 10:06:57 -0500 Subject: runit-scripts: Defined new print procedure for runit to use. Convert some scripts to use the new printhlr procedure. Cleanup of a couple scripts to stop spewing crap on the console. --- abs/core/runit-scripts/PKGBUILD | 4 ++-- abs/core/runit-scripts/fbsplash-runit.sh | 24 ++++++++++++++-------- abs/core/runit-scripts/runitscripts/3 | 7 ++++++- .../runit-scripts/runitscripts/services/lircd/run | 3 ++- .../runit-scripts/runitscripts/services/netfs/run | 3 ++- .../runitscripts/services/nfs-common/run | 12 ++++++----- 6 files changed, 34 insertions(+), 19 deletions(-) diff --git a/abs/core/runit-scripts/PKGBUILD b/abs/core/runit-scripts/PKGBUILD index 4c3c8e1..ee88800 100755 --- a/abs/core/runit-scripts/PKGBUILD +++ b/abs/core/runit-scripts/PKGBUILD @@ -1,6 +1,6 @@ pkgname=runit-scripts pkgver=2.1.1 -pkgrel=30 +pkgrel=33 pkgdesc="collection of startup scripts for runit" url="http://smarden.org/runit/" license="BSD" @@ -27,4 +27,4 @@ build() { install -m0755 reboot-runit halt-runit logger $startdir/pkg/sbin rsync -a --exclude=.svn services/* $startdir/pkg/etc/sv } -md5sums=('fdc7aee7ce323f1e55060e2da54a9534') +md5sums=('45d0b0c6ad9b00eeaaef3341245a8d4c') diff --git a/abs/core/runit-scripts/fbsplash-runit.sh b/abs/core/runit-scripts/fbsplash-runit.sh index 90430dd..a9432d0 100755 --- a/abs/core/runit-scripts/fbsplash-runit.sh +++ b/abs/core/runit-scripts/fbsplash-runit.sh @@ -3,6 +3,9 @@ # Who is calling? # CALLER=$0 +printhlr() { + printf "${C_OTHER}${PREFIX_REG} ${C_H1}${1}${C_CLEAR} \n" + } # splash stuff # if [ -e /etc/conf.d/fbsplash.conf ] @@ -13,13 +16,19 @@ then # Redefine the stat functions # stat_runit() { - printf "${C_OTHER}${PREFIX_REG} ${C_MAIN}${1}${C_CLEAR} " - printf "${SAVE_POSITION}" - deltext - printf " ${C_OTHER}[${C_BUSY}BKGD${C_OTHER}]${C_CLEAR} " + # printf "${C_OTHER}${PREFIX_REG} ${C_MAIN}${1}${C_CLEAR} " + # printf "${SAVE_POSITION}" + # deltext + # printf " ${C_OTHER}[${C_BUSY}BKGD${C_OTHER}]${C_CLEAR} "a + + printf "" + printhlr "${C_MAIN}${1}${C_CLEAR} " + # Load variables # + var_load STEP_NR MAX_STEPS RC_MULTI RC_SYSINIT RC_SHUTDOWN # Only update the splash progress if we're in sysinit, multi, or shutdown. # + ((SPLASH_STEP_NR++)) SPLASH_PROGRESS=$((100*${SPLASH_STEP_NR}/${SPLASH_MAX_STEPS})) SPLASH_CURRENT_PROGRESS=${SPLASH_PROGRESS} @@ -29,10 +38,7 @@ then } else stat_runit(){ - - printf "${C_OTHER}${PREFIX_REG} ${C_MAIN}${1}${C_CLEAR} " - printf "${SAVE_POSITION}" - deltext - printf " ${C_OTHER}[${C_BUSY}BKGD${C_OTHER}]${C_CLEAR} " + printf "" + printhlr "${C_MAIN}${1}${C_CLEAR} " } fi diff --git a/abs/core/runit-scripts/runitscripts/3 b/abs/core/runit-scripts/runitscripts/3 index d4b0a6a..15e4c5f 100755 --- a/abs/core/runit-scripts/runitscripts/3 +++ b/abs/core/runit-scripts/runitscripts/3 @@ -1,5 +1,10 @@ #!/bin/sh -for i in `seq 30` + +. /etc/rc.conf +. /etc/rc.d/functions + +echo "======================================================================" +for i in `seq 3` do echo " " > /dev/tty1 done diff --git a/abs/core/runit-scripts/runitscripts/services/lircd/run b/abs/core/runit-scripts/runitscripts/services/lircd/run index f8f24c1..966b980 100755 --- a/abs/core/runit-scripts/runitscripts/services/lircd/run +++ b/abs/core/runit-scripts/runitscripts/services/lircd/run @@ -31,7 +31,8 @@ else stat_runit "Starting lirc" #enable lirc bridge protocol - /usr/bin/ir-keytable -p lirc & + printhl " lirc: ir-keytable" + /usr/bin/ir-keytable -p lirc > /dev/null 2>/dev/null [ -e /etc/sv/lircd/.runtime ] || mkdir -p /etc/sv/lircd/.runtime [ -e /var/run/lirc ] || mkdir -p /var/run/lirc diff --git a/abs/core/runit-scripts/runitscripts/services/netfs/run b/abs/core/runit-scripts/runitscripts/services/netfs/run index 8b6a8b1..06180c2 100755 --- a/abs/core/runit-scripts/runitscripts/services/netfs/run +++ b/abs/core/runit-scripts/runitscripts/services/netfs/run @@ -1,6 +1,7 @@ #!/bin/sh exec 2>&1 +exec 1>/dev/null sv start rpcbind -sv start nfs-common +sv start nfs-common /etc/rc.d/netfs start diff --git a/abs/core/runit-scripts/runitscripts/services/nfs-common/run b/abs/core/runit-scripts/runitscripts/services/nfs-common/run index bf6c2a1..f0dbb6e 100755 --- a/abs/core/runit-scripts/runitscripts/services/nfs-common/run +++ b/abs/core/runit-scripts/runitscripts/services/nfs-common/run @@ -62,20 +62,22 @@ get_pid() { -stat_runit "Starting $daemon_name" +stat_runit "Starting NFS-common: $daemon_name" svwaitup rpcbind >/dev/null 2>/dev/null -/usr/sbin/sm-notify $SMNOTIFY_OPTS + +printhl " NFS-common: sm-notify" +/usr/sbin/sm-notify $SMNOTIFY_OPTS >/dev/null 2>/dev/null do_modprobe sunrpc do_modprobe nfs do_modprobe nfsd do_mount rpc_pipefs "$PIPEFS_MOUNTPOINT" "$PIPEFS_MOUNTOPTS" -stat_runit "Starting $IDMAPD_DAEMON_NAME" +printhl " NFS-common: $IDMAPD_DAEMON_NAME" $IDMAPD -stat_runit "Starting $GSSD_DAEMON_NAME" +printhl " NFS-common: $GSSD_DAEMON_NAME" do_modprobe rpcsec_gss_krb5 $GSSD -$STATD -F +$STATD -F > /dev/null 2>/dev/null -- cgit v0.12