#baud=""
# set the terminal type
-#termtype="linux"
+#term_type="linux"
# extra options to pass to agetty for this port
#agetty_options=""
-# If you wish to pass any options to killall5 during shutdown,
+# If you wish to pass any options to kill_all during shutdown,
# you should do so here.
+#
+# The setting is called killall5_opts because the options here are meant
+# to be identical to those you could pass to killall5.
killall5_opts=""
port="${RC_SVCNAME#*.}"
term_type="${term_type:-linux}"
command=/sbin/agetty
-command_args_foreground="${agetty_options} ${port} ${baud} ${termtype}"
+command_args_foreground="${agetty_options} ${port} ${baud} ${term_type}"
pidfile="/run/${RC_SVCNAME}.pid"
depend() {
{
# Write a halt record if we're shutting down
if [ "$RC_RUNLEVEL" = shutdown ]; then
- [ "$RC_UNAME" = Linux ] && halt -w
+ [ "$RC_UNAME" = Linux ] && openrc-shutdown -w
if [ "$RC_SYS" = OPENVZ ]; then
yesno $RC_REBOOT && printf "" >/reboot
fi
description="Sets the hostname of the machine."
-depend() {
+depend()
+{
after clock
keyword -docker -lxc -prefix -systemd-nspawn
}
{
local h source x
if [ -s /etc/hostname ] && [ -r /etc/hostname ]; then
- read h x </etc/hostname
- source=" from /etc/hostname"
+ read h x </etc/hostname
+ source="from /etc/hostname"
else
# HOSTNAME variable used to be defined in caps in conf.d/hostname.
# It is also a magic variable in bash.
- h=${hostname-${HOSTNAME}} # checkbashisms: false positive
+ h=${hostname:-${HOSTNAME}} # checkbashisms: false positive (HOSTNAME var)
fi
if [ -z "$h" ]; then
einfo "Using default system hostname"
start()
{
ebegin "Terminating remaining processes"
- killall5 -15 ${killall5_opts}
+ kill_all 15 ${killall5_opts}
eend 0
ebegin "Killing remaining processes"
- killall5 -9 ${killall5_opts}
+ kill_all 9 ${killall5_opts}
eend 0
}
if [ -d /sys/firmware/efi/efivars ] &&
! mountinfo -q /sys/firmware/efi/efivars; then
ebegin "Mounting efivarfs filesystem"
- mount -n -t efivarfs -o ${sysfs_opts} \
+ mount -n -t efivarfs -o ro \
efivarfs /sys/firmware/efi/efivars 2> /dev/null
eend 0
fi