removido
(usa Nenhuma)
Enviado em 08/07/2017 - 16:33h
Shell padrão não existe no init, ele deve iniciar os ttys
agetty tty1 linux 38400
Esse são meus scripts de inicialização
#!/bin/execlineb -P
# system one time tasks
# Export a proper envionroment
export PATH "/s6/helpers:/run/s6/rc.d:/s6/rc.d:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin"
cd /
s6-setsid -qb --
umask 022
if { s6-mount -o size=100%,mode=0755,noatime,nosuid,nodev -t tmpfs tmpfs "/run" }
if { s6-hiercopy "/s6"/run-image/ "/run" }
redirfd -r 0 /dev/null
redirfd -wnb 1 "/run"/service/s6-svscan-log/fifo
background
{
s6-setsid --
redirfd -w 1 "/run"/service/s6-svscan-log/fifo
fdmove -c 1 2
cd /run
/s6/s6-stage2
}
unexport !
cd "/run"/service
export PATH "/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin"
fdmove -c 2 1
s6-svscan -st0
#!/bin/execlineb -P
forbacktickx -p i { s6-ls -- /s6/rc.d }
importas -u i i
background { runonce ${i} }
#!/bin/execlineb -S0
cd /
# Merge environment
s6-envdir -I /s6/env-stage3
background { s6-echo -- syncing disk ... }
foreground { s6-sync }
background { s6-echo -- sending TERM to all processes ... }
foreground { s6-nuke -th } # foreground is process 1: it survives
importas -D "3000" TERM_GRACETIME TERM_GRACETIME
background { s6-echo -- wait ${TERM_GRACETIME} ms for graceful kill ... }
foreground { s6-sleep -m -- ${TERM_GRACETIME} }
background { s6-echo -- sending KILL to all processes ... }
foreground { s6-nuke -k }
background { s6-echo -- turning off swap }
foreground
{
ifelse -n { s6-test -d /proc/swaps } { }
s6-swapoff -a
}
background { s6-echo -- unmount local filesystems }
foreground { s6-umount -a }
background { s6-echo -- remount root as read-only }
foreground { s6-mount -n -o remount,ro /dev/root / }
# Reap all zombies then sync, and we're done
wait { }
foreground { s6-sync }
background { s6-echo -- doing ${@} ... }
foreground { ifelse { s6-test "$@" = "reboot" } { s6-reboot -f } s6-poweroff -f }