aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sh/functions.sh20
-rw-r--r--src/rc.c12
2 files changed, 9 insertions, 23 deletions
diff --git a/sh/functions.sh b/sh/functions.sh
index 18194862..5b4f8d91 100644
--- a/sh/functions.sh
+++ b/sh/functions.sh
@@ -17,26 +17,6 @@ eoutdent() {
return 0
}
-# void esyslog(char* priority, char* tag, char* message)
-#
-# use the system logger to log a message
-#
-esyslog() {
- local pri= tag=
-
- if [ -x /usr/bin/logger ] ; then
- pri="$1"
- tag="$2"
-
- shift 2
- [ -z "$*" ] && return 0
-
- /usr/bin/logger -p "${pri}" -t "${tag}" -- "$*"
- fi
-
- return 0
-}
-
# Safer way to list the contents of a directory,
# as it do not have the "empty dir bug".
#
diff --git a/src/rc.c b/src/rc.c
index ad47378e..1824e058 100644
--- a/src/rc.c
+++ b/src/rc.c
@@ -172,12 +172,18 @@ static int do_e (int argc, char **argv)
char *dot = strchr (argv[0], '.');
if ((level = syslog_decode (dot + 1, prioritynames)) == -1)
eerrorx ("%s: invalid log level `%s'", applet, argv[0]);
- argc--;
- argv++;
+
+ if (argc < 3)
+ eerrorx ("%s: not enough arguments", applet);
+
+ unsetenv ("RC_ELOG");
+ setenv ("RC_ELOG", argv[1], 1);
+
+ argc -= 2;
+ argv += 2;
}
}
-
if (argc > 0) {
for (i = 0; i < argc; i++)
l += strlen (argv[i]) + 1;