]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Detect Slackware RC. Also rename ORC to OPENRC and BRC to BSDRC.
authorRoy Marples <roy@marples.name>
Thu, 15 Nov 2007 23:58:16 +0000 (23:58 +0000)
committerRoy Marples <roy@marples.name>
Thu, 15 Nov 2007 23:58:16 +0000 (23:58 +0000)
Makefile
README
config.h

index 2103fcc027780eb4989ddd0520008f1750879e26..17147edf7ef532050f46be0d7df9974a81076722 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -66,9 +66,10 @@ FORK = $(_HAVE_FORK)$(shell $(_HAVE_FORK_SH))
 # Work out how to restart services 
 _RC_SH = if [ -n "$(HAVE_INIT)" ]; then \
                 [ "$(HAVE_INIT)" = "no" ] || echo "-DENABLE_$(HAVE_INIT)"; \
-                elif [ -x /sbin/runscript ]; then echo "-DENABLE_ORC"; \
+                elif [ -x /sbin/runscript ]; then echo "-DENABLE_OPENRC"; \
                 elif [ -x /sbin/service ]; then echo "-DENABLE_SERVICE"; \
-                elif [ -d /etc/rc.d ]; then echo "-DENABLE_BRC"; \
+                elif [ -x /etc/rc.d/rc.S -a -x /etc/rc.d/rc.M ]; then echo "-DENABLE_SLACKRC"; \
+                elif [ -d /etc/rc.d ]; then echo "-DENABLE_BSDRC"; \
                 elif [ -d /etc/init.d ]; then echo "-DENABLE_SYSV"; \
                 fi
 _RC != $(_RC_SH)
diff --git a/README b/README
index 21bff96c7a2cfed20a2d36dee2c306e1e03aa931..284acc392839655dc8e75108eb601a5454d7fda5 100644 (file)
--- a/README
+++ b/README
@@ -21,9 +21,10 @@ to the make command to avoid to automatic test.
 
 We try and detect how to restart ntp and ypbind, you can override this with
 HAVE_INIT=no or force one of these values
-ORC      (OpenRC as used by Gentoo (forked from baselayout))
-BRC      (BSD RC system - /etc/rc.d/ntpd restart )
+OPENRC   (OpenRC as used by Gentoo (forked from baselayout))
+BSDRC    (BSD RC system - /etc/rc.d/ntpd restart )
 SERVICE  (RedHat service command - service ntpd restart)
+SLACKRC  (Slackware RC system - /etc/rc.d/rc.ntpd restart)
 SYSV     (SYSV style - /etc/init.d/ntpd restart)
 
 You can change the default dir where dhcpcd stores it's .info files with
index 515b24cf72ef212d423541a9c6ededc5b48d6934..5397519ed2f548d6ac92d0680cf6adcd41cf10ae 100644 (file)
--- a/config.h
+++ b/config.h
 #define INFOFILE            INFODIR "/" PACKAGE "-%s.info"
 #define DUIDFILE            INFODIR "/" PACKAGE ".duid"
 
-/* ORC is Open Run Control, forked from Gentoo's baselayout package
- * BRC is BSD style Run Control
- * SRC is Slackware Run Control
- * SERVICE is RedHat
+/* OPENRC is Open Run Control, forked from Gentoo's baselayout package
+ * BSDRC is BSD style Run Control
+ * SLACKRC is Slackware Run Control
+ * SERVICE is RedHat service command
  * SYSV should cover everthing else */
-#ifdef ENABLE_ORC
-# define SERVICE             "ORC"
+#ifdef ENABLE_OPENRC
+# define SERVICE             "OPENRC"
 # define NISSERVICE          ETCDIR "/init.d/ypbind"
 # define NISRESTARTARGS      "--nodeps", "--quiet", "conditionalrestart"
 # define NTPSERVICE          ETCDIR "/init.d/ntpd"
 # define NTPRESTARTARGS      "--nodeps", "--quiet", "conditionalrestart"
-#elif ENABLE_BRC
-# define SERVICE             "BRC"
+#elif ENABLE_BSDRC
+# define SERVICE             "BSDRC"
 # define NISSERVICE          ETCDIR "/rc.d/ypbind"
 # define NISRESTARTARGS      "restart"
 # define NTPSERVICE          ETCDIR "/rc.d/ntpd"
 # define NTPRESTARTARGS      "restart"
-#elif ENABLE_SRC
-# define SERVICE             "SRC"
+#elif ENABLE_SLACKRC
+# define SERVICE             "SLACKRC"
 # define NISSERVICE          ETCDIR "/rc.d/rc.ypbind"
 # define NISRESTARTARGS      "restart"
 # define NTPSERVICE          ETCDIR "/rc.d/rc.ntpd"