From 8ed5487f7754ea083d7ff4ca69ee912ecc775498 Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: May 17 2018 08:31:38 +0000 Subject: Do not run telinit u on upgrades (#1579225) --- diff --git a/glibc_post_upgrade.c b/glibc_post_upgrade.c index 3b31912..9645e99 100644 --- a/glibc_post_upgrade.c +++ b/glibc_post_upgrade.c @@ -136,33 +136,6 @@ main (void) "--nostdlib", iconv_dir); } - /* Check if telinit is available and either SysVInit fifo, - or upstart telinit. */ - if (access ("/sbin/telinit", X_OK) - || ((!!access ("/dev/initctl", F_OK)) - ^ !access ("/sbin/initctl", X_OK))) - _exit (0); - - /* Check if we are not inside of some chroot, because we'd just - timeout and leave /etc/initrunlvl. - - On more modern systems this test is not sufficient to detect - if we're in a chroot. */ - if (readlink ("/proc/1/exe", initpath, 256) <= 0 || - readlink ("/proc/1/root", initpath, 256) <= 0) - _exit (0); - - /* Here's another well known way to detect chroot, at least on an - ext and xfs filesystems and assuming nothing mounted on the chroot's - root. */ - if (stat ("/", &statbuf) != 0 - || (statbuf.st_ino != 2 - && statbuf.st_ino != 128)) - _exit (0); - - if (check_elf ("/proc/1/exe")) - verbose_exec (116, "/sbin/telinit", "/sbin/telinit", "u"); - _exit(0); }