]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
core: drop references to Upstart
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Sun, 7 Feb 2021 16:02:56 +0000 (17:02 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Sun, 7 Feb 2021 16:02:56 +0000 (17:02 +0100)
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.)

src/core/manager.c
src/shared/utmp-wtmp.c
src/systemctl/systemctl.c

index 6858950107985ea1812364516ae7b84adede6f69..ba627e042591fdcf86be08733bb156873033328f 100644 (file)
@@ -510,7 +510,7 @@ static int manager_setup_signals(Manager *m) {
                         SIGCHLD,     /* Child died */
                         SIGTERM,     /* Reexecute daemon */
                         SIGHUP,      /* Reload configuration */
-                        SIGUSR1,     /* systemd/upstart: reconnect to D-Bus */
+                        SIGUSR1,     /* systemd: reconnect to D-Bus */
                         SIGUSR2,     /* systemd: dump status */
                         SIGINT,      /* Kernel sends us this on control-alt-del */
                         SIGWINCH,    /* Kernel sends us this on kbrequest (alt-arrowup) */
index b36bc205123eac0c82382a318db6f4dd98684853..3eeee24693ff3d87637df0bf1560e67bdafbfab2 100644 (file)
@@ -38,18 +38,10 @@ int utmp_get_runlevel(int *runlevel, int *previous) {
          * very new and not apply to the current script being executed. */
 
         e = getenv("RUNLEVEL");
-        if (e && e[0] > 0) {
+        if (!isempty(e)) {
                 *runlevel = e[0];
-
-                if (previous) {
-                        /* $PREVLEVEL seems to be an Upstart thing */
-
-                        e = getenv("PREVLEVEL");
-                        if (e && e[0] > 0)
-                                *previous = e[0];
-                        else
-                                *previous = 0;
-                }
+                if (previous)
+                        *previous = 0;
 
                 return 0;
         }
index c53ed41cc325dd6e991917bd2b4ae088b1813796..f60187e43a909542467241fecf9dd2fa30e0207f 100644 (file)
@@ -970,8 +970,8 @@ static int parse_argv(int argc, char *argv[]) {
                                 arg_action = _ACTION_INVALID;
                                 return telinit_parse_argv(argc, argv);
                         } else {
-                                /* Hmm, so some other init system is running, we need to forward this request to
-                                 * it. For now we simply guess that it is Upstart. */
+                                /* Hmm, so some other init system is running, we need to forward this request
+                                 * to it. */
 
                                 (void) rlimit_nofile_safe();
                                 execv(TELINIT, argv);