[Initng-svn] r2671 - initng/initfiles/daemon

svn at initng.thinktux.net svn at initng.thinktux.net
Mon Jan 2 17:50:52 CET 2006


Author: deac
Date: Mon Jan  2 17:50:51 2006
New Revision: 2671

Modified:
   initng/initfiles/daemon/dbus.ii
   initng/initfiles/daemon/dhcpcd.ii
   initng/initfiles/daemon/gpm.ii
Log:
gpm: cleaned up

Modified: initng/initfiles/daemon/dbus.ii
==============================================================================
--- initng/initfiles/daemon/dbus.ii	(original)
+++ initng/initfiles/daemon/dbus.ii	Mon Jan  2 17:50:51 2006
@@ -13,7 +13,7 @@
 #endd
 #ifd debian
 	script daemon = {
-		[ "${ENABLED}" == "0" ] && exit 0
+		[ "${ENABLED}" = 0 ] && exit 0
 
 		#Debian and Ubuntu are using different files
 		if [ -x /usr/bin/dbus-daemon-1 ]

Modified: initng/initfiles/daemon/dhcpcd.ii
==============================================================================
--- initng/initfiles/daemon/dhcpcd.ii	(original)
+++ initng/initfiles/daemon/dhcpcd.ii	Mon Jan  2 17:50:51 2006
@@ -30,7 +30,7 @@
 			esac
 		done
 
-		# Bad things happen if we get an infinite lease, 
+		# Bad things happen if we get an infinite lease,
 		# so try and make sure we don't
 		echo "${opts}" | @grep@ -w -- '-l' > /dev/null || opts="${opts} -l 86400"
 

Modified: initng/initfiles/daemon/gpm.ii
==============================================================================
--- initng/initfiles/daemon/gpm.ii	(original)
+++ initng/initfiles/daemon/gpm.ii	Mon Jan  2 17:50:51 2006
@@ -1,40 +1,26 @@
 daemon daemon/gpm {
 	need = system/bootmisc;
 #ifd debian
-        env CFG=/etc/gpm.conf;
-
-        script daemon = {
-                cmdln=
-
-                if [ -f $CFG ]
-                then
-                        . $CFG
-
-                        if [ -n "$device" ]; then cmdln="$cmdln -m $device"; fi
-                        if [ -n "$type" ]; then cmdln="$cmdln -t $type"; fi
-                        if [ -n "$responsiveness" ]; then cmdln="$cmdln -r $responsiveness"; fi
-                        if [ -n "$sample_rate" ]; then cmdln="$cmdln -s $sample_rate"; fi
-                        # Yes, this /IS/ correct! There is no space after -R!!!!!!
-                        # I reserve the right to throw manpages at anyone who disagrees.
-                        if [ -n "$repeat_type" ] && [ "$repeat_type" != "none" ]; then
-                                cmdln="$cmdln -R$repeat_type"
-                        fi
-                        if [ -n "$append" ]; then cmdln="$cmdln $append"; fi
-                        # If both the second device and type are specified, use it.
-                        if [ -n "$device2" ] && [ -n "$type2" ] ; then
-                                cmdln="$cmdln -M -m $device2 -t $type2"
-                        fi
-
-                        /usr/sbin/gpm -m ${device} -t ${type} ${cmdln} -D;
-                else
-                        echo GPM unconfigured.
-                        exit 1
-                fi
-        };
+	# "Please read CODING_STANDARDS for ii-files!"
+	env device=/dev/input/mice;
+	env type=imps2;
+	env append=;
+	env_file_required = /etc/gpm.conf;
+	script daemon = {
+		[ -n "${responsiveness}" ] && responsiveness="${-r ${responsiveness}"
+		[ -n "${sample_rate}" ] && sample_rate="-s ${sample_rate}"
+		# Yes, this /IS/ correct! There is no space after -R!!!!!!
+		# I reserve the right to throw manpages at anyone who disagrees.
+		[ -n "${repeat_type}" -a "${repeat_type}" != "none" ] && append="-R${repeat_type} ${append}"
+		# If both the second device and type are specified, use it.
+		[ -n "${device2}" -a -n "${type2}" ] && append="-M -m ${device2} -t ${type2} ${append}"
+		/usr/sbin/gpm -m "${device}" -t "${type}" ${append} -D
+	};
 #elsed
 	env MOUSE=imps2;
 	env MOUSEDEV=/dev/input/mice;
 	env APPEND=;
+	env_file = /etc/conf.d/gpm;
 	exec daemon = @/usr/sbin/gpm@ -m ${MOUSEDEV} -t ${MOUSE} ${APPEND};
 	pid_file = /var/run/gpm.pid;
 #endd


More information about the Initng-svn mailing list