summaryrefslogtreecommitdiffstats
path: root/initscript
diff options
context:
space:
mode:
authorWilliam Immendorf <will.immendorf@gmail.com>2009-04-05 20:38:00 +0200
committerLennart Poettering <lennart@poettering.net>2009-04-05 20:38:58 +0200
commitc19ece348e308b47bd99aad2f4e98c691e78d15d (patch)
treed86ff6994dbda0ba35f643b2ad62a5f34fe0488f /initscript
parent8581af00cf97aafb1fbc7b9dca1c026be95ffec9 (diff)
add init script for LFS
Diffstat (limited to 'initscript')
-rw-r--r--initscript/Makefile.am4
-rw-r--r--initscript/lfs/Makefile.am29
-rw-r--r--initscript/lfs/avahi.in49
3 files changed, 82 insertions, 0 deletions
diff --git a/initscript/Makefile.am b/initscript/Makefile.am
index 7fcd15f..d5fadda 100644
--- a/initscript/Makefile.am
+++ b/initscript/Makefile.am
@@ -19,6 +19,10 @@
SUBDIRS =
+if TARGET_LFS
+SUBDIRS += lfs
+endif
+
if TARGET_DEBIAN
SUBDIRS += debian
endif
diff --git a/initscript/lfs/Makefile.am b/initscript/lfs/Makefile.am
new file mode 100644
index 0000000..d5e33f8
--- /dev/null
+++ b/initscript/lfs/Makefile.am
@@ -0,0 +1,29 @@
+# $Id$
+
+# This file is part of avahi.
+#
+# avahi is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as
+# published by the Free Software Foundation; either version 2 of the
+# License, or (at your option) any later version.
+#
+# avahi is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
+# License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with avahi; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+# USA.
+
+initddir = $(sysconfdir)/rc.d/init.d
+
+EXTRA_DIST = avahi.in
+
+initd_SCRIPTS = avahi
+
+CLEANFILES = avahi
+
+avahi: avahi.in
+ chmod +x $@
diff --git a/initscript/lfs/avahi.in b/initscript/lfs/avahi.in
new file mode 100644
index 0000000..ba3672a
--- /dev/null
+++ b/initscript/lfs/avahi.in
@@ -0,0 +1,49 @@
+#!/bin/sh
+########################################################################
+# Begin $rc_base/init.d/avahi
+#
+# Description : Avahi daemon loader
+#
+# Authors : William Immendorf - will.immendorf@gmail.com
+#
+# Version : 00.00
+#
+# Notes : Based off of the LFS 6.4 sysklogd script.
+#
+########################################################################
+
+. /etc/sysconfig/rc
+. ${rc_functions}
+
+case "${1}" in
+ start)
+ boot_mesg "Starting the Avahi daemon..."
+ loadproc avahi-daemon -D
+ ;;
+
+ stop)
+ boot_mesg "Stopping the Avahi daemon..."
+ avahi-daemon -k
+ evaluate_retval
+ ;;
+
+ reload)
+ boot_mesg "Reloading the Avahi daemon..."
+ reloadproc avahi-daemon -r
+ ;;
+ restart)
+ ${0} stop
+ sleep 1
+ ${0} start
+ ;;
+
+ status)
+ statusproc avahi-daemon
+ ;;
+ *)
+ echo "Usage: ${0} {start|stop|reload|restart|status}"
+ exit 1
+ ;;
+esac
+
+# End $rc_base/init.d/avahi