Skip to content

Commit 54d04cd

Browse files
committed
core: drop references to Upstart
The last release of Upstart was July 2014 [1], and there have been no new commits to the repo. We should move on too. [1] https://lists.ubuntu.com/archives/upstart-devel/2014-July/003313.html The only real support was in the code that looked for $PREVLEVEL. https://codesearch.debian.net/search?q=PREVLEVEL&literal=1&perpkg=1 shows this string in our own code (or the copy in elogind), our own man pages, and init scripts for two packages (brltty, salt), which shouldn't be used with systemd. (And both *check* for PREVLEVEL, and don't set it. So most likely nothing at all sets it.)
1 parent 8e45c72 commit 54d04cd

File tree

3 files changed

+6
-14
lines changed

3 files changed

+6
-14
lines changed

src/core/manager.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -510,7 +510,7 @@ static int manager_setup_signals(Manager *m) {
510510
SIGCHLD, /* Child died */
511511
SIGTERM, /* Reexecute daemon */
512512
SIGHUP, /* Reload configuration */
513-
SIGUSR1, /* systemd/upstart: reconnect to D-Bus */
513+
SIGUSR1, /* systemd: reconnect to D-Bus */
514514
SIGUSR2, /* systemd: dump status */
515515
SIGINT, /* Kernel sends us this on control-alt-del */
516516
SIGWINCH, /* Kernel sends us this on kbrequest (alt-arrowup) */

src/shared/utmp-wtmp.c

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -38,18 +38,10 @@ int utmp_get_runlevel(int *runlevel, int *previous) {
3838
* very new and not apply to the current script being executed. */
3939

4040
e = getenv("RUNLEVEL");
41-
if (e && e[0] > 0) {
41+
if (!isempty(e)) {
4242
*runlevel = e[0];
43-
44-
if (previous) {
45-
/* $PREVLEVEL seems to be an Upstart thing */
46-
47-
e = getenv("PREVLEVEL");
48-
if (e && e[0] > 0)
49-
*previous = e[0];
50-
else
51-
*previous = 0;
52-
}
43+
if (previous)
44+
*previous = 0;
5345

5446
return 0;
5547
}

src/systemctl/systemctl.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -970,8 +970,8 @@ static int parse_argv(int argc, char *argv[]) {
970970
arg_action = _ACTION_INVALID;
971971
return telinit_parse_argv(argc, argv);
972972
} else {
973-
/* Hmm, so some other init system is running, we need to forward this request to
974-
* it. For now we simply guess that it is Upstart. */
973+
/* Hmm, so some other init system is running, we need to forward this request
974+
* to it. */
975975

976976
(void) rlimit_nofile_safe();
977977
execv(TELINIT, argv);

0 commit comments

Comments
 (0)