From: Roy Marples Date: Tue, 21 Jan 2020 22:39:55 +0000 (+0000) Subject: Remove RC_SVCNAME. X-Git-Tag: v9.0.0~87 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5b5da4e5b136b55e6fae2a1f5ccbde50ab90f7de;p=thirdparty%2Fdhcpcd.git Remove RC_SVCNAME. We've not used that for quite a while now..... --- diff --git a/BUILDING.md b/BUILDING.md index 20157b76..7e1f7150 100644 --- a/BUILDING.md +++ b/BUILDING.md @@ -170,17 +170,3 @@ If running privilege separation and on Linux then the `00-linux` hook is **mandatory**. If you choose not to run it, then you are responsible for setting up the needed mount points: `/dev`, `/proc`, `/sys`, `/run/udev` - -Some system services expose the name of the service we are in, -by default dhcpcd will pick `RC_SVCNAME` from the environment. -You can override this in `CPPFLAGS+= -DRC_SVCNAME="YOUR_SVCNAME"`. -This is important because dhcpcd will scrub the environment aside from `$PATH` -before running hooks. -This variable could be used to facilitate service re-entry so this chain could -happen in a custom OS hook: - dhcpcd service marked inactive && dhcpcd service starts - dependant services are not started because dhcpcd is inactive (not stopped) - dhcpcd hook tests if `$if_up = true` and `$af_waiting` is empty or unset. - if true, mark the dhcpcd service as started and then start dependencies - if false and the dhcpcd service was previously started, mark as inactive and - stop any dependant services. diff --git a/hooks/dhcpcd-run-hooks.8.in b/hooks/dhcpcd-run-hooks.8.in index 7cf17ed1..c401afe8 100644 --- a/hooks/dhcpcd-run-hooks.8.in +++ b/hooks/dhcpcd-run-hooks.8.in @@ -147,9 +147,7 @@ script to process them. .Sh ENVIRONMENT .Nm dhcpcd will clear the environment variables aside from -.Ev $PATH -and -.Ev $RC_SVCNAME . +.Ev $PATH . The following variables will then be set, along with any protocol supplied ones. .Bl -tag -width xnew_delegated_dhcp6_prefix diff --git a/src/script.c b/src/script.c index d919333a..6189a4c1 100644 --- a/src/script.c +++ b/src/script.c @@ -57,11 +57,6 @@ #include "privsep.h" #include "script.h" -/* Allow the OS to define another script env var name */ -#ifndef RC_SVCNAME -#define RC_SVCNAME "RC_SVCNAME" -#endif - #define DEFAULT_PATH "/usr/bin:/usr/sbin:/bin:/sbin" static const char * const if_params[] = {