Package: runit-init
Version: 2.1.2-11
Severity: normal


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

Kernel: Linux 4.15.12-van (SMP w/4 CPU cores; PREEMPT)
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: sysvinit (via /sbin/init)

Versions of packages runit-init depends on:
ii  getty-run     2.1.2-11
ii  initscripts   2.88dsf-59.10
ii  libc6         2.27-3
ii  runit         2.1.2-11
ii  runit-helper  2.7.2
ii  sysv-rc       2.88dsf-59.10

runit-init recommends no packages.

runit-init suggests no packages.

-- no debconf information

Dear Maintainer,

I've found two issues with the stage 1 file you are shipping with 2.1.11
 first: touch/chmod on /run/runit.stopit is done too early in the boot process, 
/run is not yet mounted 
        (not in the title, just don't want to open another bug as i'm attaching 
a 
         stage1 example that fixes both)

 second: GRUB menu has two line for each kernel, and the second one is supposed 
to boot you into an 
         emergency sell, but runit has no support for that so it turns out into 
a regular boot. 
         I think that a working emergency shell is a "must-have" feature, 
expecially untill runit
         suport within Debian is still in development.
         
the following example of stage 1 file works for me

-------------------------------

$ cat /etc/runit/1                                                              
                                    
#!/bin/sh                                                                       
                                                  
# system one time tasks                                                         
                                                  
                                                                                
                                                  
PATH=/sbin:/usr/sbin:/bin:/usr/bin                                              
                                                  
                                                                                
                                                  
# starting initscripts                                                          
                                                  
for initdir in /etc/rcS.d ; do                                                  
                                                  
       for script in "$initdir/S"* ; do
               path=$(realpath "$script")
               name=$(basename "$path")
                "$script" start
       done
done
unset path name

# now /run is mounted
touch /run/runit.stopit
chmod 0 /run/runit.stopit

# single mode emergency shell, if requested in GRUB menu
if grep -q -w -i "single" /proc/cmdline 
  then
       echo "Give root password for maintenance or press CONTROL-D to continue"
       sulogin
fi

# starting sevices not yet-migrated to runit
for servicedir in  /etc/rc2.d ; do
        for script in "$servicedir/S"* ; do
                path=$(realpath "$script")
                name=$(basename "$path")
                [ -d "/etc/sv/$name" ] || "$script" start
        done
done
unset path name

--------------------------------------------------------------------------

I'm aware that a proper support for emergency shell is more complex than this ( 
a single runlevel with 
a sulogin service and some code that select the runlevel to boot into ) but in 
the meantime could you 
evaluate the example and eventually (if it looks ok to you) add it to runit?

Anyway, thank you for maintaining runit!
Lorenzo

Reply via email to