[Frugalware-darcs] upstart-jobs: upstart-jobs: some initmsg changes - now each message is prefixed with the job name unless UPSTART_JOB is null or the -p option is given

AlexExtreme alex at alex-smith.me.uk
Fri Jun 15 21:07:33 CEST 2007


Darcsweb-Url: http://darcs.frugalware.org/darcsweb/darcsweb.cgi?r=upstart-jobs;a=darcs_commitdiff;h=20070615190522-46e39-298cbb20bdec1d743a8256737e3bdcdc198ff0c9.gz;

[upstart-jobs: some initmsg changes - now each message is prefixed with the job name unless UPSTART_JOB is null or the -p option is given
AlexExtreme <alex at alex-smith.me.uk>**20070615190522] {
hunk ./jobs.d/hostname 9
+	export UPSTART_JOB
+
hunk ./jobs.d/hwclock 12
+	export UPSTART_JOB
hunk ./jobs.d/hwclock 25
+	export UPSTART_JOB
hunk ./jobs.d/keymap 9
+	export UPSTART_JOB
hunk ./jobs.d/load-modules 9
+	export UPSTART_JOB
hunk ./jobs.d/loopback 11
+	export UPSTART_JOB
hunk ./jobs.d/mount 9
+	export UPSTART_JOB
hunk ./jobs.d/random 12
+	export UPSTART_JOB
hunk ./jobs.d/shutdown 10
+	export UPSTART_JOB
+	
hunk ./jobs.d/udevtrigger 9
+	export UPSTART_JOB
+	
hunk ./jobs.d/welcome 10
-		initmsg msg "Welcome to $(cat /etc/frugalware-release)!"
+		initmsg msg -p "Welcome to $(cat /etc/frugalware-release)!"
hunk ./jobs.d/welcome 12
-		initmsg msg "Welcome to Frugalware Linux!"
+		initmsg msg -p "Welcome to Frugalware Linux!"
hunk ./jobs.d/welcome 14
-	initmsg msg "Copyright (C) 2004-2007 Frugalware Developer Team"
+	initmsg msg -p "Copyright (C) 2004-2007 Frugalware Developer Team"
hunk ./src/initmsg 46
-	$ECHO "$msg_prefix$*$msg_suffix"
+	if [ -z "$UPSTART_JOB" -o "$1" = "-p" ]; then
+		[ "$1" = "-p" ] && shift 1
+		$ECHO "$msg_prefix$*$msg_suffix"
+	else
+		$ECHO "${CYAN}${UPSTART_JOB} ${SET_NAME_COL}${WHITE}| $msg_prefix$*$workmsg_suffix"
+	fi
hunk ./src/initmsg 55
-	$ECHO "$hint_prefix$*$hint_suffix"
+	if [ -z "$UPSTART_JOB" -o "$1" = "-p" ]; then
+		[ "$1" = "-p" ] && shift 1
+		$ECHO "$hint_prefix$*$hint_suffix"
+	else
+		$ECHO "${CYAN}${UPSTART_JOB} ${SET_NAME_COL}${WHITE}| $hint_prefix$*$hint_suffix"
+	fi
hunk ./src/initmsg 64
+	if [ ! -z "$UPSTART_JOB" -a "$1" != "-p" ]; then
+		myprefix="${CYAN}${UPSTART_JOB} ${SET_NAME_COL}${WHITE}| "
+	fi
+	
+	[ "$1" = "-p" ] && shift 1
hunk ./src/initmsg 71
+	
hunk ./src/initmsg 73
-		$ECHO "$ok_prefix$*$ok_suffix"
+		$ECHO "$myprefix$ok_prefix$*$ok_suffix"
hunk ./src/initmsg 75
-		$ECHO "$failed_prefix$*$failed_suffix"
+		$ECHO "$myprefix$failed_prefix$*$failed_suffix"
hunk ./sysconfig/initmsg 22
+SET_NAME_COL="\\033[13G"
hunk ./sysconfig/initmsg 27
+workmsg_suffix="${SET_COL}${CYAN}busy${NORMAL}"
hunk ./sysconfig/initmsg 32
-ok_prefix="${GREEN} *${NORMAL} ${BOLD}"
+ok_prefix="${BLUE}>>${NORMAL} ${BOLD}"
}


More information about the Frugalware-darcs mailing list