From: Roy Marples Date: Thu, 15 Nov 2007 23:58:16 +0000 (+0000) Subject: Detect Slackware RC. Also rename ORC to OPENRC and BRC to BSDRC. X-Git-Tag: v3.2.3~131 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9868f79cb4d57c2cef1cb76833ee107ad37dfaaa;p=thirdparty%2Fdhcpcd.git Detect Slackware RC. Also rename ORC to OPENRC and BRC to BSDRC. --- diff --git a/Makefile b/Makefile index 2103fcc0..17147edf 100644 --- 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 21bff96c..284acc39 100644 --- 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 diff --git a/config.h b/config.h index 515b24cf..5397519e 100644 --- a/config.h +++ b/config.h @@ -63,25 +63,25 @@ #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"