From a12dbdc6c93a7d63591610378e3e570b7c7d2143 Mon Sep 17 00:00:00 2001 From: Roy Marples Date: Sun, 2 Mar 2008 21:13:21 +0000 Subject: Don't check for root in prefix. --- init.d.FreeBSD/clock | 61 ------------------- init.d.FreeBSD/clock.in | 61 +++++++++++++++++++ init.d.FreeBSD/devd | 22 ------- init.d.FreeBSD/devd.in | 22 +++++++ init.d.FreeBSD/dumpon | 25 -------- init.d.FreeBSD/dumpon.in | 25 ++++++++ init.d.FreeBSD/ipfw | 149 ---------------------------------------------- init.d.FreeBSD/ipfw.in | 149 ++++++++++++++++++++++++++++++++++++++++++++++ init.d.FreeBSD/mixer | 47 --------------- init.d.FreeBSD/mixer.in | 47 +++++++++++++++ init.d.FreeBSD/nscd | 22 ------- init.d.FreeBSD/nscd.in | 22 +++++++ init.d.FreeBSD/powerd | 35 ----------- init.d.FreeBSD/powerd.in | 35 +++++++++++ init.d.FreeBSD/syscons | 83 -------------------------- init.d.FreeBSD/syscons.in | 83 ++++++++++++++++++++++++++ 16 files changed, 444 insertions(+), 444 deletions(-) delete mode 100644 init.d.FreeBSD/clock create mode 100644 init.d.FreeBSD/clock.in delete mode 100644 init.d.FreeBSD/devd create mode 100644 init.d.FreeBSD/devd.in delete mode 100644 init.d.FreeBSD/dumpon create mode 100644 init.d.FreeBSD/dumpon.in delete mode 100644 init.d.FreeBSD/ipfw create mode 100644 init.d.FreeBSD/ipfw.in delete mode 100644 init.d.FreeBSD/mixer create mode 100644 init.d.FreeBSD/mixer.in delete mode 100644 init.d.FreeBSD/nscd create mode 100644 init.d.FreeBSD/nscd.in delete mode 100644 init.d.FreeBSD/powerd create mode 100644 init.d.FreeBSD/powerd.in delete mode 100644 init.d.FreeBSD/syscons create mode 100644 init.d.FreeBSD/syscons.in (limited to 'init.d.FreeBSD') diff --git a/init.d.FreeBSD/clock b/init.d.FreeBSD/clock deleted file mode 100644 index 7fcb0256..00000000 --- a/init.d.FreeBSD/clock +++ /dev/null @@ -1,61 +0,0 @@ -#!/sbin/runscript -# Copyright 2007-2008 Roy Marples -# All rights reserved. Released under the 2-clause BSD license. - -extra_commands="save" - -description="Sets the local clock to UTC or Local Time." -description_save="Saves the current time in the BIOS." - -clock=${clock:-${CLOCK:-UTC}} -if [ "${clock}" = "UTC" ]; then - utc="UTC" -else - utc="Local Time" -fi - -depend() -{ - # BSD adjkerntz needs to be able to write to /etc - if [ "${clock}" = "UTC" -a -e /etc/wall_cmos_clock ] || - [ "${clock}" != "UTC" -a ! -e /etc/wall_cmos_clock ]; then - need root - fi - keyword nojail -} - -start() -{ - ebegin "Starting the System Clock Adjuster [${utc}]" - if [ "${clock}" != "UTC" ]; then - echo >/etc/wall_cmos_clock - start-stop-daemon --start --exec /sbin/adjkerntz -- -i - else - rm -f /etc/wall_cmos_clock - /sbin/adjkerntz -i - fi - eend $? -} - -save() -{ - ebegin "Setting hardware clock using the system clock [${utc}]" - adjkerntz -a - eend $? -} - -stop() -{ - # Don't tweak the hardware clock on LiveCD halt. - if yesno "${clock_systohc:-${CLOCK_SYSTOHC}}"; then - [ -z "${CDBOOT}" ] && save - fi - - ebegin "Stopping the System Clock Adjuster" - if start-stop-daemon --test --quiet --stop --exec /sbin/adjkerntz; then - start-stop-daemon --stop --exec /sbin/adjkerntz - eend $? - else - eend 0 - fi -} diff --git a/init.d.FreeBSD/clock.in b/init.d.FreeBSD/clock.in new file mode 100644 index 00000000..3a2c050b --- /dev/null +++ b/init.d.FreeBSD/clock.in @@ -0,0 +1,61 @@ +#!/sbin/runscript +# Copyright 2007-2008 Roy Marples +# All rights reserved. Released under the 2-clause BSD license. + +extra_commands="save" + +description="Sets the local clock to UTC or Local Time." +description_save="Saves the current time in the BIOS." + +clock=${clock:-${CLOCK:-UTC}} +if [ "${clock}" = "UTC" ]; then + utc="UTC" +else + utc="Local Time" +fi + +depend() +{ + # BSD adjkerntz needs to be able to write to /etc + if [ "${clock}" = "UTC" -a -e /etc/wall_cmos_clock ] || + [ "${clock}" != "UTC" -a ! -e /etc/wall_cmos_clock ]; then + need root + fi + keyword nojail noprefix +} + +start() +{ + ebegin "Starting the System Clock Adjuster [${utc}]" + if [ "${clock}" != "UTC" ]; then + echo >/etc/wall_cmos_clock + start-stop-daemon --start --exec /sbin/adjkerntz -- -i + else + rm -f /etc/wall_cmos_clock + /sbin/adjkerntz -i + fi + eend $? +} + +save() +{ + ebegin "Setting hardware clock using the system clock [${utc}]" + adjkerntz -a + eend $? +} + +stop() +{ + # Don't tweak the hardware clock on LiveCD halt. + if yesno "${clock_systohc:-${CLOCK_SYSTOHC}}"; then + [ -z "${CDBOOT}" ] && save + fi + + ebegin "Stopping the System Clock Adjuster" + if start-stop-daemon --test --quiet --stop --exec /sbin/adjkerntz; then + start-stop-daemon --stop --exec /sbin/adjkerntz + eend $? + else + eend 0 + fi +} diff --git a/init.d.FreeBSD/devd b/init.d.FreeBSD/devd deleted file mode 100644 index 04ed3af5..00000000 --- a/init.d.FreeBSD/devd +++ /dev/null @@ -1,22 +0,0 @@ -#!/sbin/runscript -# Copyright 2007-2008 Roy Marples -# All rights reserved. Released under the 2-clause BSD license. - -command=/sbin/devd -command_args=${devd_args} -name="Device State Change Daemon" - -depend() { - need localmount - after bootmisc - before net.lo0 - keyword nojail -} - -start_pre() { - sysctl hw.bus.devctl_disable=0 >/dev/null -} - -stop_post() { - sysctl hw.bus.devctl_disable=1 >/dev/null -} diff --git a/init.d.FreeBSD/devd.in b/init.d.FreeBSD/devd.in new file mode 100644 index 00000000..3c312845 --- /dev/null +++ b/init.d.FreeBSD/devd.in @@ -0,0 +1,22 @@ +#!/sbin/runscript +# Copyright 2007-2008 Roy Marples +# All rights reserved. Released under the 2-clause BSD license. + +command=/sbin/devd +command_args=${devd_args} +name="Device State Change Daemon" + +depend() { + need localmount + after bootmisc + before net.lo0 + keyword nojail noprefix +} + +start_pre() { + sysctl hw.bus.devctl_disable=0 >/dev/null +} + +stop_post() { + sysctl hw.bus.devctl_disable=1 >/dev/null +} diff --git a/init.d.FreeBSD/dumpon b/init.d.FreeBSD/dumpon deleted file mode 100644 index b69e4ffe..00000000 --- a/init.d.FreeBSD/dumpon +++ /dev/null @@ -1,25 +0,0 @@ -#!/sbin/runscript -# Copyright 2007-2008 Roy Marples -# All rights reserved. Released under the 2-clause BSD license. - -description="Configures a specific kernel dump device." - -depend() { - need swap - keyword nojail -} - -start() { - # Setup any user requested dump device - if [ -n "${dump_device}" ]; then - ebegin "Activating kernel core dump device (${dump_device})" - dumpon ${dump_device} - eend $? - fi -} - -stop() { - ebegin "Deactiving kernel core dump device" - dumpon off - eend $? -} diff --git a/init.d.FreeBSD/dumpon.in b/init.d.FreeBSD/dumpon.in new file mode 100644 index 00000000..c34c76c2 --- /dev/null +++ b/init.d.FreeBSD/dumpon.in @@ -0,0 +1,25 @@ +#!/sbin/runscript +# Copyright 2007-2008 Roy Marples +# All rights reserved. Released under the 2-clause BSD license. + +description="Configures a specific kernel dump device." + +depend() { + need swap + keyword nojail noprefix +} + +start() { + # Setup any user requested dump device + if [ -n "${dump_device}" ]; then + ebegin "Activating kernel core dump device (${dump_device})" + dumpon ${dump_device} + eend $? + fi +} + +stop() { + ebegin "Deactiving kernel core dump device" + dumpon off + eend $? +} diff --git a/init.d.FreeBSD/ipfw b/init.d.FreeBSD/ipfw deleted file mode 100644 index 200b9cee..00000000 --- a/init.d.FreeBSD/ipfw +++ /dev/null @@ -1,149 +0,0 @@ -#!/sbin/runscript -# Copyright 2007-2008 Roy Marples -# All rights reserved. Released under the 2-clause BSD license. - -# This is based on /etc/rc.firewall and /etc/rc.firewall6 from FreeBSD - -ipfw_ip_in=${ipfw_ip_in-any} -ipfw_ports_in=${ipfw_ports_in-auth ssh} -ipfw_ports_nolog=${ipfw_ports_nolog-135-139,445 1026,1027 1433,1434} - -opts="panic showstatus" - -depend() { - before net - provide firewall - keyword nojail -} - -ipfw() { - /sbin/ipfw -f -q "$@" -} - -init() { - # Load the kernel module - if ! sysctl net.inet.ip.fw.enable=1 >/dev/null 2>&1; then - if ! kldload ipfw; then - eend 1 "Unable to load firewall module" - return 1 - fi - fi - - # Now all rules and give a good base - ipfw flush - - ipfw add pass all from any to any via lo0 - ipfw add deny all from any to 127.0.0.0/8 - ipfw add deny ip from 127.0.0.0/8 to any - - ipfw add pass ip6 from any to any via lo0 - ipfw add deny ip6 from any to ::1 - ipfw add deny ip6 from ::1 to any - - ipfw add pass ip6 from :: to ff02::/16 proto ipv6-icmp - ipfw add pass ip6 from fe80::/10 to fe80::/10 proto ipv6-icmp - ipfw add pass ip6 from fe80::/10 to ff02::/16 proto ipv6-icmp -} - -start() { - local i= p= log= - ebegin "Starting firewall rules" - if ! init; then - eend 1 "Failed to flush firewall ruleset" - return 1 - fi - - # Use a statefull firewall - ipfw add check-state - ipfw add pass tcp from me to any established - - # Allow any connection out, adding state for each. - ipfw add pass tcp from me to any setup keep-state - ipfw add pass udp from me to any keep-state - ipfw add pass icmp from me to any keep-state - - ipfw add pass tcp from me6 to any setup keep-state - ipfw add pass udp from me6 to any keep-state - ipfw add pass icmp from me6 to any keep-state - - # Allow DHCP. - ipfw add pass udp from 0.0.0.0 68 to 255.255.255.255 67 out - ipfw add pass udp from any 67 to me 68 in - ipfw add pass udp from any 67 to 255.255.255.255 68 in - # Some servers will ping the IP while trying to decide if it's - # still in use. - ipfw add pass icmp from any to any icmptype 8 - - # Allow "mandatory" ICMP in. - ipfw add pass icmp from any to any icmptype 3,4,11 - - # Allow ICMPv6 destination unreach - ipfw add pass ip6 from any to any icmp6types 1 proto ipv6-icmp - - # Allow NS/NA/toobig (don't filter it out) - ipfw add pass ip6 from any to any icmp6types 2,135,136 proto ipv6-icmp - - # Add permits for this workstations published services below - # Only IPs and nets in firewall_allowservices is allowed in. - for i in ${ipfw_ip_in}; do - for p in ${ipfw_ports_in}; do - ipfw add pass tcp from ${i} to me ${p} - done - done - - # Allow all connections from trusted IPs. - # Playing with the content of firewall_trusted could seriously - # degrade the level of protection provided by the firewall. - for i in ${ipfw_ip_trust}; do - ipfw add pass ip from ${i} to me - done - - ipfw add 65000 count ip from any to any - - # Drop packets to ports where we don't want logging - for p in ${ipfw_ports_nolog}; do - ipfw add deny { tcp or udp } from any to any ${p} in - done - - # Broadcasts and muticasts - ipfw add deny ip from any to 255.255.255.255 - ipfw add deny ip from any to 224.0.0.0/24 - - # Noise from routers - ipfw add deny udp from any to any 520 in - - # Noise from webbrowsing. - # The statefull filter is a bit agressive, and will cause some - # connection teardowns to be logged. - ipfw add deny tcp from any 80,443 to any 1024-65535 in - - # Deny and (if wanted) log the rest unconditionally. - if yesno ${ipfw_log_deny:-no}; then - log="log" - sysctl net.inet.ip.fw.verbose=1 >/dev/null - fi - ipfw add deny ${log} ip from any to any - - eend 0 -} - -stop() { - ebegin "Stopping firewall rules" - # We don't unload the kernel module as that action - # can cause memory leaks as of FreeBSD 6.x - sysctl net.inet.ip.fw.enable=0 >/dev/null - eend $? -} - -panic() { - ebegin "Stopping firewall rules - hard" - if ! init; then - eend 1 "Failed to flush firewall ruleset" - return 1 - fi - eend 0 -} - -showstatus() { - ipfw show -} diff --git a/init.d.FreeBSD/ipfw.in b/init.d.FreeBSD/ipfw.in new file mode 100644 index 00000000..200b9cee --- /dev/null +++ b/init.d.FreeBSD/ipfw.in @@ -0,0 +1,149 @@ +#!/sbin/runscript +# Copyright 2007-2008 Roy Marples +# All rights reserved. Released under the 2-clause BSD license. + +# This is based on /etc/rc.firewall and /etc/rc.firewall6 from FreeBSD + +ipfw_ip_in=${ipfw_ip_in-any} +ipfw_ports_in=${ipfw_ports_in-auth ssh} +ipfw_ports_nolog=${ipfw_ports_nolog-135-139,445 1026,1027 1433,1434} + +opts="panic showstatus" + +depend() { + before net + provide firewall + keyword nojail +} + +ipfw() { + /sbin/ipfw -f -q "$@" +} + +init() { + # Load the kernel module + if ! sysctl net.inet.ip.fw.enable=1 >/dev/null 2>&1; then + if ! kldload ipfw; then + eend 1 "Unable to load firewall module" + return 1 + fi + fi + + # Now all rules and give a good base + ipfw flush + + ipfw add pass all from any to any via lo0 + ipfw add deny all from any to 127.0.0.0/8 + ipfw add deny ip from 127.0.0.0/8 to any + + ipfw add pass ip6 from any to any via lo0 + ipfw add deny ip6 from any to ::1 + ipfw add deny ip6 from ::1 to any + + ipfw add pass ip6 from :: to ff02::/16 proto ipv6-icmp + ipfw add pass ip6 from fe80::/10 to fe80::/10 proto ipv6-icmp + ipfw add pass ip6 from fe80::/10 to ff02::/16 proto ipv6-icmp +} + +start() { + local i= p= log= + ebegin "Starting firewall rules" + if ! init; then + eend 1 "Failed to flush firewall ruleset" + return 1 + fi + + # Use a statefull firewall + ipfw add check-state + ipfw add pass tcp from me to any established + + # Allow any connection out, adding state for each. + ipfw add pass tcp from me to any setup keep-state + ipfw add pass udp from me to any keep-state + ipfw add pass icmp from me to any keep-state + + ipfw add pass tcp from me6 to any setup keep-state + ipfw add pass udp from me6 to any keep-state + ipfw add pass icmp from me6 to any keep-state + + # Allow DHCP. + ipfw add pass udp from 0.0.0.0 68 to 255.255.255.255 67 out + ipfw add pass udp from any 67 to me 68 in + ipfw add pass udp from any 67 to 255.255.255.255 68 in + # Some servers will ping the IP while trying to decide if it's + # still in use. + ipfw add pass icmp from any to any icmptype 8 + + # Allow "mandatory" ICMP in. + ipfw add pass icmp from any to any icmptype 3,4,11 + + # Allow ICMPv6 destination unreach + ipfw add pass ip6 from any to any icmp6types 1 proto ipv6-icmp + + # Allow NS/NA/toobig (don't filter it out) + ipfw add pass ip6 from any to any icmp6types 2,135,136 proto ipv6-icmp + + # Add permits for this workstations published services below + # Only IPs and nets in firewall_allowservices is allowed in. + for i in ${ipfw_ip_in}; do + for p in ${ipfw_ports_in}; do + ipfw add pass tcp from ${i} to me ${p} + done + done + + # Allow all connections from trusted IPs. + # Playing with the content of firewall_trusted could seriously + # degrade the level of protection provided by the firewall. + for i in ${ipfw_ip_trust}; do + ipfw add pass ip from ${i} to me + done + + ipfw add 65000 count ip from any to any + + # Drop packets to ports where we don't want logging + for p in ${ipfw_ports_nolog}; do + ipfw add deny { tcp or udp } from any to any ${p} in + done + + # Broadcasts and muticasts + ipfw add deny ip from any to 255.255.255.255 + ipfw add deny ip from any to 224.0.0.0/24 + + # Noise from routers + ipfw add deny udp from any to any 520 in + + # Noise from webbrowsing. + # The statefull filter is a bit agressive, and will cause some + # connection teardowns to be logged. + ipfw add deny tcp from any 80,443 to any 1024-65535 in + + # Deny and (if wanted) log the rest unconditionally. + if yesno ${ipfw_log_deny:-no}; then + log="log" + sysctl net.inet.ip.fw.verbose=1 >/dev/null + fi + ipfw add deny ${log} ip from any to any + + eend 0 +} + +stop() { + ebegin "Stopping firewall rules" + # We don't unload the kernel module as that action + # can cause memory leaks as of FreeBSD 6.x + sysctl net.inet.ip.fw.enable=0 >/dev/null + eend $? +} + +panic() { + ebegin "Stopping firewall rules - hard" + if ! init; then + eend 1 "Failed to flush firewall ruleset" + return 1 + fi + eend 0 +} + +showstatus() { + ipfw show +} diff --git a/init.d.FreeBSD/mixer b/init.d.FreeBSD/mixer deleted file mode 100644 index b8c8f3af..00000000 --- a/init.d.FreeBSD/mixer +++ /dev/null @@ -1,47 +0,0 @@ -#!/sbin/runscript -# Copyright 2007-2008 Roy Marples -# All rights reserved. Released under the 2-clause BSD license. - -extra_commands="restore" - -depend() -{ - need localmount - keyword nojail -} - -restore() -{ - local mixer= retval=0 - ebegin "Restoring mixer settings" - eindent - for mixer in /dev/mixer*; do - if [ -r "/var/db/${mixer#/dev/}-state" ]; then - vebegin "${mixer}" - mixer -f "${mixer}" \ - $(cat "/var/db/${mixer#/dev/}-state") >/dev/null - veend $? - : $((retval += $?)) - fi - done -} - -start() -{ - restore -} - -stop() -{ - local mixer= retval=0 - ebegin "Saving mixer settings" - eindent - for mixer in /dev/mixer*; do - vebegin "${mixer}" - mixer -f "${mixer}" -s >/var/db/"${mixer#/dev/}"-state - veend $? - : $((retval += $?)) - done - eoutdent - eend ${retval} -} diff --git a/init.d.FreeBSD/mixer.in b/init.d.FreeBSD/mixer.in new file mode 100644 index 00000000..b8c8f3af --- /dev/null +++ b/init.d.FreeBSD/mixer.in @@ -0,0 +1,47 @@ +#!/sbin/runscript +# Copyright 2007-2008 Roy Marples +# All rights reserved. Released under the 2-clause BSD license. + +extra_commands="restore" + +depend() +{ + need localmount + keyword nojail +} + +restore() +{ + local mixer= retval=0 + ebegin "Restoring mixer settings" + eindent + for mixer in /dev/mixer*; do + if [ -r "/var/db/${mixer#/dev/}-state" ]; then + vebegin "${mixer}" + mixer -f "${mixer}" \ + $(cat "/var/db/${mixer#/dev/}-state") >/dev/null + veend $? + : $((retval += $?)) + fi + done +} + +start() +{ + restore +} + +stop() +{ + local mixer= retval=0 + ebegin "Saving mixer settings" + eindent + for mixer in /dev/mixer*; do + vebegin "${mixer}" + mixer -f "${mixer}" -s >/var/db/"${mixer#/dev/}"-state + veend $? + : $((retval += $?)) + done + eoutdent + eend ${retval} +} diff --git a/init.d.FreeBSD/nscd b/init.d.FreeBSD/nscd deleted file mode 100644 index e75f5dc9..00000000 --- a/init.d.FreeBSD/nscd +++ /dev/null @@ -1,22 +0,0 @@ -#!/sbin/runscript -# Copyright 2007-2008 Roy Marples -# All rights reserved. Released under the 2-clause BSD license. - -command=/usr/sbin/nscd -command_args="${nscd_args}" -pidfile=/var/run/nscd.pid -name="Name Service Cache Daemon" - -extra_started_commands="flush" - -depend() { - need localmount - use net dns ldap ypbind - after bootmisc -} - -flush() { - ebegin "Flushing ${name}" - nscd -I all >/dev/null - eend $? -} diff --git a/init.d.FreeBSD/nscd.in b/init.d.FreeBSD/nscd.in new file mode 100644 index 00000000..e75f5dc9 --- /dev/null +++ b/init.d.FreeBSD/nscd.in @@ -0,0 +1,22 @@ +#!/sbin/runscript +# Copyright 2007-2008 Roy Marples +# All rights reserved. Released under the 2-clause BSD license. + +command=/usr/sbin/nscd +command_args="${nscd_args}" +pidfile=/var/run/nscd.pid +name="Name Service Cache Daemon" + +extra_started_commands="flush" + +depend() { + need localmount + use net dns ldap ypbind + after bootmisc +} + +flush() { + ebegin "Flushing ${name}" + nscd -I all >/dev/null + eend $? +} diff --git a/init.d.FreeBSD/powerd b/init.d.FreeBSD/powerd deleted file mode 100644 index 106962a6..00000000 --- a/init.d.FreeBSD/powerd +++ /dev/null @@ -1,35 +0,0 @@ -#!/sbin/runscript -# Copyright 2007-2008 Roy Marples -# All rights reserved. Released under the 2-clause BSD license. - -command=/usr/sbin/powerd -command_args=${powerd_args} -pidfile=/var/run/powerd.pid -name="Power Control Daemon" - -depend() -{ - need localmount - use logger - after bootmisc - keyword nojail -} - -start_pre() -{ - if [ -n "${powerd_battery_mode}" ]; then - command_args="${command_args} -b ${powerd_battery_mode}" - fi - if [ -n "${powerd_ac_mode}" ]; then - command_args="${command_args} -a ${powerd_ac_mode}" - fi -} - -stop_post() -{ - local level=$(sysctl -n dev.cpu.0.freq_levels | - sed -e 's:/.*::') - if [ -n "${level}" ]; then - sysctl dev.cpu.0.freq="${level}" >/dev/null - fi -} diff --git a/init.d.FreeBSD/powerd.in b/init.d.FreeBSD/powerd.in new file mode 100644 index 00000000..106962a6 --- /dev/null +++ b/init.d.FreeBSD/powerd.in @@ -0,0 +1,35 @@ +#!/sbin/runscript +# Copyright 2007-2008 Roy Marples +# All rights reserved. Released under the 2-clause BSD license. + +command=/usr/sbin/powerd +command_args=${powerd_args} +pidfile=/var/run/powerd.pid +name="Power Control Daemon" + +depend() +{ + need localmount + use logger + after bootmisc + keyword nojail +} + +start_pre() +{ + if [ -n "${powerd_battery_mode}" ]; then + command_args="${command_args} -b ${powerd_battery_mode}" + fi + if [ -n "${powerd_ac_mode}" ]; then + command_args="${command_args} -a ${powerd_ac_mode}" + fi +} + +stop_post() +{ + local level=$(sysctl -n dev.cpu.0.freq_levels | + sed -e 's:/.*::') + if [ -n "${level}" ]; then + sysctl dev.cpu.0.freq="${level}" >/dev/null + fi +} diff --git a/init.d.FreeBSD/syscons b/init.d.FreeBSD/syscons deleted file mode 100644 index 45ed5b0c..00000000 --- a/init.d.FreeBSD/syscons +++ /dev/null @@ -1,83 +0,0 @@ -#!/sbin/runscript -# Copyright 2007-2008 Roy Marples -# All rights reserved. Released under the 2-clause BSD license. - -depend() { - need localmount - keyword nojail -} - -start() { - if [ -n "${allscreen_flags}" ]; then - ebegin "Setting mode to ${allscreen_flags} for all screens" - for v in /dev/ttyv*; do - vidcontrol ${allscreen_flags} <"${v}" - done - eend $? - fi - - if [ -n "${keymap}" ]; then - ebegin "Setting keymap to ${keymap}" - kbdcontrol -l ${keymap} \`$2'" - kbdcontrol -f "$1" "$2" +# All rights reserved. Released under the 2-clause BSD license. + +depend() { + need localmount + keyword nojail noprefix +} + +start() { + if [ -n "${allscreen_flags}" ]; then + ebegin "Setting mode to ${allscreen_flags} for all screens" + for v in /dev/ttyv*; do + vidcontrol ${allscreen_flags} <"${v}" + done + eend $? + fi + + if [ -n "${keymap}" ]; then + ebegin "Setting keymap to ${keymap}" + kbdcontrol -l ${keymap} \`$2'" + kbdcontrol -f "$1" "$2"