diff options
Diffstat (limited to 'package/xdm/files')
-rw-r--r-- | package/xdm/files/xdm.init | 31 | ||||
-rw-r--r-- | package/xdm/files/xdm.postinst | 3 |
2 files changed, 34 insertions, 0 deletions
diff --git a/package/xdm/files/xdm.init b/package/xdm/files/xdm.init new file mode 100644 index 000000000..1bcce7df5 --- /dev/null +++ b/package/xdm/files/xdm.init @@ -0,0 +1,31 @@ +#!/bin/sh +#PKG xdm +#INIT 99 + +. /etc/rc.conf + +case $1 in +autostop) ;; +autostart) + test x"${xdm:-NO}" = x"NO" && exit 0 + exec sh $0 start + ;; +start) + if [ ! -d /var/lib/xdm ];then + mkdir -p /var/lib/xdm + fi + xdm + ;; +stop) + kill $(pgrep -f /usr/bin/xdm) + ;; +restart) + sh $0 stop + sh $0 start + ;; +*) + echo "Usage: $0 {start | stop | restart}" + exit 1 + ;; +esac +exit $? diff --git a/package/xdm/files/xdm.postinst b/package/xdm/files/xdm.postinst new file mode 100644 index 000000000..be112629e --- /dev/null +++ b/package/xdm/files/xdm.postinst @@ -0,0 +1,3 @@ +#!/bin/sh +. $IPKG_INSTROOT/etc/functions.sh +add_rcconf xdm xdm YES |