From 72a6bd4b5d2734f2c4f2f37589db3ba82829d770 Mon Sep 17 00:00:00 2001 From: Yegor Yefremov Date: Mon, 10 Oct 2011 11:22:00 +0200 Subject: xdm: install startup script install S99xdm to /etc/init.d to start XDM automatically [Peter: Small cleanups] Signed-off-by: Yegor Yefremov Signed-off-by: Peter Korsgaard --- package/x11r7/xapp_xdm/S99xdm | 25 +++++++++++++++++++++++++ package/x11r7/xapp_xdm/xapp_xdm.mk | 7 +++++++ 2 files changed, 32 insertions(+) create mode 100644 package/x11r7/xapp_xdm/S99xdm (limited to 'package') diff --git a/package/x11r7/xapp_xdm/S99xdm b/package/x11r7/xapp_xdm/S99xdm new file mode 100644 index 000000000..4dd1cd888 --- /dev/null +++ b/package/x11r7/xapp_xdm/S99xdm @@ -0,0 +1,25 @@ +#!/bin/sh + +XDM_BIN=/usr/bin/xdm + +case "$1" in + start) + echo -n "Starting XDM: " + $XDM_BIN + echo "done" + ;; + stop) + echo "Stopping XDM" + killall -q xdm + ;; + restart) + $0 stop + $0 start + ;; + *) + echo "Usage: $0 {start|stop|restart}" + exit 1 + ;; +esac + +exit 0 diff --git a/package/x11r7/xapp_xdm/xapp_xdm.mk b/package/x11r7/xapp_xdm/xapp_xdm.mk index ce3850331..7268d5d38 100644 --- a/package/x11r7/xapp_xdm/xapp_xdm.mk +++ b/package/x11r7/xapp_xdm/xapp_xdm.mk @@ -12,4 +12,11 @@ XAPP_XDM_DEPENDENCIES = xapp_xinit xapp_sessreg xapp_xrdb xlib_libX11 xlib_libXa XAPP_XDM_CONF_OPT = --with-utmp-file=/var/adm/utmpx \ --with-wtmp-file=/var/adm/wtmpx +define XAPP_XDM_INSTALL_STARTUP_SCRIPT + $(INSTALL) -m 0755 -D package/x11r7/xapp_xdm/S99xdm \ + $(TARGET_DIR)/etc/init.d/S99xdm +endef + +XAPP_XDM_POST_INSTALL_TARGET_HOOKS += XAPP_XDM_INSTALL_STARTUP_SCRIPT + $(eval $(call AUTOTARGETS)) -- cgit v1.2.3