aboutsummaryrefslogtreecommitdiff
path: root/src/rc
diff options
context:
space:
mode:
Diffstat (limited to 'src/rc')
-rw-r--r--src/rc/checkpath.c4
-rw-r--r--src/rc/fstabinfo.c4
-rw-r--r--src/rc/mountinfo.c2
-rw-r--r--src/rc/rc-depend.c4
-rw-r--r--src/rc/rc-status.c2
-rw-r--r--src/rc/rc-update.c4
-rw-r--r--src/rc/start-stop-daemon.c3
7 files changed, 7 insertions, 16 deletions
diff --git a/src/rc/checkpath.c b/src/rc/checkpath.c
index 51780329..9352535b 100644
--- a/src/rc/checkpath.c
+++ b/src/rc/checkpath.c
@@ -46,7 +46,7 @@
#include "einfo.h"
#include "rc-misc.h"
-static const char *applet;
+extern const char *applet;
static int do_check (char *path, uid_t uid, gid_t gid, mode_t mode, int file)
{
@@ -188,8 +188,6 @@ int checkpath (int argc, char **argv)
bool file = 0;
int retval = EXIT_SUCCESS;
- applet = basename_c (argv[0]);
-
while ((opt = getopt_long (argc, argv, getoptstring,
longopts, (int *) 0)) != -1)
{
diff --git a/src/rc/fstabinfo.c b/src/rc/fstabinfo.c
index 446f9bee..98d16fdf 100644
--- a/src/rc/fstabinfo.c
+++ b/src/rc/fstabinfo.c
@@ -86,7 +86,7 @@ static struct mntent *getmntfile (const char *file)
}
#endif
-static const char *applet = NULL;
+extern const char *applet;
#include "_usage.h"
#define getoptstring "bmop:t:" getoptstring_COMMON
@@ -128,8 +128,6 @@ int fstabinfo (int argc, char **argv)
char *file;
bool filtered = false;
- applet = basename_c (argv[0]);
-
/* Ensure that we are only quiet when explicitly told to be */
unsetenv ("EINFO_QUIET");
diff --git a/src/rc/mountinfo.c b/src/rc/mountinfo.c
index b15a50a3..e48c62ad 100644
--- a/src/rc/mountinfo.c
+++ b/src/rc/mountinfo.c
@@ -58,7 +58,7 @@
#include "rc-misc.h"
#include "strlist.h"
-static const char *applet;
+extern const char *applet;
typedef enum {
mount_from,
diff --git a/src/rc/rc-depend.c b/src/rc/rc-depend.c
index 0bb4c213..d4ce8317 100644
--- a/src/rc/rc-depend.c
+++ b/src/rc/rc-depend.c
@@ -45,7 +45,7 @@
#include "rc-misc.h"
#include "strlist.h"
-static const char *applet;
+extern const char *applet;
rc_depinfo_t *_rc_deptree_load (int *regen) {
if (rc_deptree_update_needed ()) {
@@ -96,8 +96,6 @@ int rc_depend (int argc, char **argv)
int opt;
char *token;
- applet = basename_c (argv[0]);
-
while ((opt = getopt_long (argc, argv, getoptstring,
longopts, (int *) 0)) != -1)
{
diff --git a/src/rc/rc-status.c b/src/rc/rc-status.c
index 9d73adb3..d6cefd7c 100644
--- a/src/rc/rc-status.c
+++ b/src/rc/rc-status.c
@@ -41,7 +41,7 @@
#include "rc-misc.h"
#include "strlist.h"
-static const char *applet;
+extern const char *applet;
static const char *const types_nua[] = { "ineed", "iuse", "iafter", NULL };
diff --git a/src/rc/rc-update.c b/src/rc/rc-update.c
index 38d4242d..1aefbc64 100644
--- a/src/rc/rc-update.c
+++ b/src/rc/rc-update.c
@@ -44,7 +44,7 @@
#include "rc-misc.h"
#include "strlist.h"
-static const char *applet = NULL;
+extern const char *applet;
/* Return the number of changes made:
* -1 = no changes (error)
@@ -157,8 +157,6 @@ int rc_update (int argc, char **argv)
int opt;
int retval = EXIT_FAILURE;
- applet = basename_c (argv[0]);
-
while ((opt = getopt_long (argc, argv, getoptstring,
longopts, (int *) 0)) != -1)
{
diff --git a/src/rc/start-stop-daemon.c b/src/rc/start-stop-daemon.c
index 5a524d99..abd7f13a 100644
--- a/src/rc/start-stop-daemon.c
+++ b/src/rc/start-stop-daemon.c
@@ -88,7 +88,7 @@ typedef struct schedulelist
} schedulelist_t;
static schedulelist_t *schedule;
-static const char *applet;
+extern const char *applet;
static char *changeuser;
static char **newenv;
@@ -575,7 +575,6 @@ int start_stop_daemon (int argc, char **argv)
char *svcname = getenv ("SVCNAME");
char *env;
- applet = basename_c (argv[0]);
atexit (cleanup);
signal_setup (SIGINT, handle_signal);