Package: runit
Version: 2.1.2-23
Severity: normal
Tags: patch


-- System Information:
Debian Release: buster/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 4.20.3-van (SMP w/4 CPU cores; PREEMPT)
Kernel taint flags: TAINT_OOT_MODULE
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), 
LANGUAGE=en_US:en (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: runit (via /run/runit.stopit)

Versions of packages runit depends on:
ii  libc6           2.28-8
ii  runit-helper    2.8.7
ii  sysuser-helper  1.3.3

Versions of packages runit recommends:
ii  runit-init  2.1.2-23

runit suggests no packages.

-- Configuration Files:
/etc/runit/2 changed [not included]
/etc/runit/3 changed [not included]

-- no debconf information

Hi Dmitry,

When I select 'recovery mode' from the grub menu the emergency shell
doesn't start with the following error 

chpst: fatal: unable to run: sulogin: file does not exist

then the boot continues and all services are started.
It looks like chpst doesn't care about PATH variable and it need a 'env'
command or the full path of the sulogin shell.
The attached patch exec sulogin shell with full path in stage 2.

Thanks,
Lorenzo
>From 47aec318eed051da62ed80f6dac5ede87962acb2 Mon Sep 17 00:00:00 2001
From: Lorenzo Puliti <[email protected]>
Date: Fri, 8 Mar 2019 16:48:44 +0100
Subject: [PATCH] Stage 2: use full path for sulogin

Use full path when executing emergency shell in stage 2
---
 debian/contrib/2 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/debian/contrib/2 b/debian/contrib/2
index 8569963..31da5e9 100755
--- a/debian/contrib/2
+++ b/debian/contrib/2
@@ -9,7 +9,7 @@ SVDIR=/etc/service
 if [ -f /run/runit.stopit ] ; then
        # single mode
        if grep -q -w -i 'single' /proc/cmdline ; then
-               chpst -P sulogin -p /dev/tty1
+               chpst -P /sbin/sulogin -p /dev/tty1
        fi
 
 
-- 
2.20.1

Reply via email to