Эх сурвалжийг харах

gpm: add init script, give sample flags working on lemote

Phil Sutter 15 жил өмнө
parent
commit
94ae124a42

+ 28 - 0
package/gpm/files/gpm.init

@@ -0,0 +1,28 @@
+#!/bin/sh
+#PKG gpm
+#INIT 80
+
+. /etc/rc.conf
+
+case $1 in
+autostop) ;;
+autostart)
+	test x"${gpm:-NO}" = x"NO" && exit 0
+	exec sh $0 start
+	;;
+start)
+	/usr/sbin/gpm $gpm_flags
+	;;
+stop)
+	pkill gpm
+	;;
+restart)
+	sh $0 stop
+	sh $0 start
+	;;
+*)
+	echo "Usage: $0 {start | stop | restart}"
+	exit 1
+	;;
+esac
+exit $?

+ 4 - 0
package/gpm/files/gpm.postinst

@@ -0,0 +1,4 @@
+#!/bin/sh
+. $IPKG_INSTROOT/etc/functions.sh
+add_rcconf 'options passed to gpm' gpm_flags "-m /dev/psaux -t ps2"
+add_rcconf gpm gpm NO