Fix style bugs:

* Space -> tabs conversion.
* Removed blanks before semicolon in "if ... ; then".
* Proper indentation of misindented lines.
* Put a full stop after some comments.
* Removed whitespace at end of line.

Approved by:	silence from gordon
This commit is contained in:
Jens Schweikhardt 2002-10-12 10:31:31 +00:00
parent de77341b0d
commit 143085107b
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=104980
52 changed files with 254 additions and 255 deletions

View File

@ -15,50 +15,50 @@ stop_cmd="network_stop"
convert_host_conf()
{
host_conf=$1; shift;
nsswitch_conf=$1; shift;
awk ' \
/^[:blank:]*#/ { next } \
/(hosts|local|file)/ { nsswitch[c] = "files"; c++; next } \
/(dns|bind)/ { nsswitch[c] = "dns"; c++; next } \
/nis/ { nsswitch[c] = "nis"; c++; next } \
{ printf "Warning: unrecognized line [%s]", $0 > "/dev/stderr" } \
END { \
printf "hosts: "; \
for (i in nsswitch) printf "%s ", nsswitch[i]; \
printf "\n"; \
}' < $host_conf > $nsswitch_conf
host_conf=$1; shift;
nsswitch_conf=$1; shift;
awk ' \
/^[:blank:]*#/ { next } \
/(hosts|local|file)/ { nsswitch[c] = "files"; c++; next } \
/(dns|bind)/ { nsswitch[c] = "dns"; c++; next } \
/nis/ { nsswitch[c] = "nis"; c++; next } \
{ printf "Warning: unrecognized line [%s]", $0 > "/dev/stderr" } \
END { \
printf "hosts: "; \
for (i in nsswitch) printf "%s ", nsswitch[i]; \
printf "\n"; \
}' < $host_conf > $nsswitch_conf
}
generate_host_conf()
{
nsswitch_conf=$1; shift;
host_conf=$1; shift;
nsswitch_conf=$1; shift;
host_conf=$1; shift;
awk '
BEGIN {
xlat["files"] = "hosts";
xlat["dns"] = "bind";
xlat["nis"] = "nis";
cont = 0;
}
sub(/^[\t ]*hosts:/, "") || cont {
if (!cont)
srcs = ""
sub(/#.*/, "")
gsub(/[][]/, " & ")
cont = sub(/\\$/, "")
srcs = srcs " " $0
}
END {
print "# Auto-generated from nsswitch.conf, do not edit"
ns = split(srcs, s)
for (n = 1; n <= ns; ++n) {
if (s[n] in xlat)
print xlat[s[n]]
}
}
' <$nsswitch_conf >$host_conf
awk '
BEGIN {
xlat["files"] = "hosts";
xlat["dns"] = "bind";
xlat["nis"] = "nis";
cont = 0;
}
sub(/^[\t ]*hosts:/, "") || cont {
if (!cont)
srcs = ""
sub(/#.*/, "")
gsub(/[][]/, " & ")
cont = sub(/\\$/, "")
srcs = srcs " " $0
}
END {
print "# Auto-generated from nsswitch.conf, do not edit"
ns = split(srcs, s)
for (n = 1; n <= ns; ++n) {
if (s[n] in xlat)
print xlat[s[n]]
}
}
' <$nsswitch_conf >$host_conf
}
network_gif_setup() {

View File

@ -24,7 +24,7 @@ accounting_start()
FreeBSD)
_dir=`dirname "$accounting_file"`
if [ ! -d `dirname "$_dir"` ]; then
if ! mkdir -p "$_dir" ; then
if ! mkdir -p "$_dir"; then
warn "Could not create $_dir."
return 1
fi

View File

@ -24,7 +24,7 @@ addswap_start()
*)
if [ -w "${swapfile}" -a -c /dev/mdctl ]; then
echo "Adding ${swapfile} as additional swap"
mdev=`mdconfig -a -t vnode -f ${swapfile}` && swapon /dev/${mdev}
mdev=`mdconfig -a -t vnode -f ${swapfile}` && swapon /dev/${mdev}
fi
;;
esac

View File

@ -28,17 +28,17 @@ NetBSD)
;;
esac
amd_precmd()
amd_precmd()
{
case ${OSTYPE} in
FreeBSD)
if ! checkyesno nfs_client_enable ; then
if ! checkyesno nfs_client_enable; then
force_depend nfsclient || return 1
fi
if ! checkyesno rpcbind_enable && \
! /etc/rc.d/rpcbind forcestatus 1>/dev/null 2>&1
then
then
force_depend rpcbind || return 1
fi

View File

@ -23,15 +23,15 @@ esac
apmd_prestart()
{
case `${SYSCTL_N} hw.machine_arch` in
i386)
case `${SYSCTL_N} hw.machine_arch` in
i386)
# Don't start if apm is already running
/etc/rc.d/apm forcestatus > /dev/null && return 1
;;
;;
*)
return 1
;;
esac
esac
return 0
}

View File

@ -17,7 +17,7 @@ load_rc_config $name
#
unaligned_warnings()
{
if ! checkyesno unaligned_print ; then
if ! checkyesno unaligned_print; then
sysctl machdep.unaligned_print=0
fi
}
@ -26,7 +26,7 @@ unaligned_warnings()
#
osf1_compat()
{
if checkyesno osf1_enable ; then
if checkyesno osf1_enable; then
echo -n ' OSF/1'
if ! kldstat -v | grep osf1_ecoff > /dev/null; then
kldload osf1 > /dev/null 2>&1
@ -38,7 +38,7 @@ osf1_compat()
#
ibcs2_compat()
{
if checkyesno ibcs2_enable ; then
if checkyesno ibcs2_enable; then
echo -n ' ibcs2'
kldload ibcs2 > /dev/null 2>&1
case ${ibcs2_loaders} in
@ -57,7 +57,7 @@ ibcs2_compat()
#
x10_daemon()
{
if checkyesno xtend_enable ; then
if checkyesno xtend_enable; then
echo -n ' xtend'
/usr/libexec/xtend
fi

View File

@ -90,7 +90,7 @@ atm2_start()
# XXX - required by atm3.sh. I don't like having one script depend
# on variables in another script (especially in a dynamic
# ordered system like this), but it's necessary for the moment.
#
#
export atm_atmarpd
export atm_scspd
}

View File

@ -90,7 +90,7 @@ atm2_start()
# XXX - required by atm3.sh. I don't like having one script depend
# on variables in another script (especially in a dynamic
# ordered system like this), but it's necessary for the moment.
#
#
export atm_atmarpd
export atm_scspd
}

View File

@ -32,7 +32,7 @@ bootconf_start()
case $name in
current|default|\*)
continue
;;
;;
*)
if [ "$name" = "$default" ]; then
echo -n "${spc}[${name}]"
@ -53,7 +53,7 @@ bootconf_start()
(sleep 30 && kill -ALRM $master) >/dev/null 2>&1 &
read conf
trap : ALRM
if [ -z $conf ] ; then
if [ -z $conf ]; then
conf=$default
fi
if [ ! -d /etc/etc.$conf/. ]; then
@ -70,7 +70,7 @@ bootconf_start()
;;
esac
if [ -f /etc/rc.conf ] ; then
if [ -f /etc/rc.conf ]; then
. /etc/rc.conf
fi
}

View File

@ -10,7 +10,7 @@
purgedir()
{
local dir file
local dir file
if [ $# -eq 0 ]; then
purgedir .

View File

@ -27,7 +27,7 @@ cleartmp_start()
(cd /tmp && rm -rf [a-km-pr-zA-Z]* &&
find -x . ! -name . ! -name lost+found ! -name quota.user \
! -name quota.group -exec rm -rf -- {} \; -type d -prune)
case ${OSTYPE} in
FreeBSD)
# Remove X lock files, since they will prevent you from

View File

@ -9,9 +9,9 @@
# Build device name databases if we are not using DEVFS
#
if sysctl vfs.devfs.generation > /dev/null 2>&1 ; then
rm -f /var/run/dev.db
if sysctl vfs.devfs.generation > /dev/null 2>&1; then
rm -f /var/run/dev.db
else
dev_mkdb
dev_mkdb
fi

View File

@ -55,8 +55,8 @@ mount_md()
# If there is a global system configuration file, suck it in.
#
if [ -r /etc/rc.subr ]; then
. /etc/rc.subr
load_rc_config $name
. /etc/rc.subr
load_rc_config $name
elif [ -r /etc/defaults/rc.conf ]; then
. /etc/defaults/rc.conf
source_rc_confs
@ -108,7 +108,7 @@ if [ ! -L /tmp ]; then
chmod 01777 /tmp
fi
if sysctl vfs.devfs.generation > /dev/null 2>&1 ; then
if sysctl vfs.devfs.generation > /dev/null 2>&1; then
# we have DEVFS, no worries...
true
else

View File

@ -83,7 +83,7 @@ fsck_start()
stop_boot
;;
esac
;;
;;
12)
echo "Boot interrupted."
stop_boot

View File

@ -81,19 +81,19 @@ bootp_ipa=""
bootp_ipbca=""
iflist=`ifconfig -l`
for i in ${iflist} ; do
set `ifconfig ${i}`
while [ $# -ge 1 ] ; do
if [ "${bootp_ifc}" = "" -a "$1" = "inet" ] ; then
bootp_ifc=${i} ; bootp_ipa=${2} ; shift
fi
if [ "${bootp_ipbca}" = "" -a "$1" = "broadcast" ] ; then
bootp_ipbca=$2; shift
fi
shift
done
if [ "${bootp_ifc}" != "" ] ; then
break
fi
set `ifconfig ${i}`
while [ $# -ge 1 ] ; do
if [ "${bootp_ifc}" = "" -a "$1" = "inet" ]; then
bootp_ifc=${i} ; bootp_ipa=${2} ; shift
fi
if [ "${bootp_ipbca}" = "" -a "$1" = "broadcast" ]; then
bootp_ipbca=$2; shift
fi
shift
done
if [ "${bootp_ifc}" != "" ]; then
break
fi
done
echo "Interface ${bootp_ifc} IP-Address ${bootp_ipa} Broadcast ${bootp_ipbca}"

View File

@ -48,7 +48,7 @@ ip6fw_start()
# Enable firewall logging
#
if checkyesno ipv6_firewall_logging ; then
if checkyesno ipv6_firewall_logging; then
echo 'IPv6 Firewall logging=YES'
sysctl net.inet6.ip6.fw.verbose=1 >/dev/null
fi

View File

@ -40,7 +40,7 @@ case ${OSTYPE} in
FreeBSD)
# load ipfilter kernel module if needed
if ! sysctl net.inet.ipf.fr_pass > /dev/null 2>&1; then
if kldload ipl ; then
if kldload ipl; then
echo 'IP-filter module loaded.'
else
warn 'IP-filter module failed to load.'
@ -79,7 +79,7 @@ ipfilter_start()
case ${OSTYPE} in
FreeBSD)
${ipfilter_program:-/sbin/ipf} -Fa -f \
"${ipfilter_rules}" ${ipfilter_flags}
"${ipfilter_rules}" ${ipfilter_flags}
;;
NetBSD)
/sbin/ipf -E -Fa
@ -115,7 +115,7 @@ ipfilter_reload()
case ${OSTYPE} in
FreeBSD)
${ipfilter_program:-/sbin/ipf} -I -Fa -f \
"${ipfilter_rules}" ${ipfilter_flags}
"${ipfilter_rules}" ${ipfilter_flags}
;;
NetBSD)
/sbin/ipf -I -Fa

View File

@ -18,8 +18,8 @@ stop_cmd="${SYSCTL_W} net.inet.ip.fw.enable=0"
ipfw_precmd()
{
if ! ${SYSCTL} net.inet.ip.fw.enable > /dev/null 2>&1 ; then
if ! kldload ipfw ; then
if ! ${SYSCTL} net.inet.ip.fw.enable > /dev/null 2>&1; then
if ! kldload ipfw; then
warn unable to load firewall module.
return 1
fi
@ -39,10 +39,10 @@ ipfw_start()
# Network Address Translation daemon
#
if checkyesno natd_enable ; then
if checkyesno natd_enable; then
if [ -n "${natd_interface}" ]; then
if echo ${natd_interface} | \
grep -q -E '^[0-9]+(\.[0-9]+){0,3}$'; then
grep -q -E '^[0-9]+(\.[0-9]+){0,3}$'; then
natd_flags="$natd_flags -a ${natd_interface}"
else
natd_flags="$natd_flags -n ${natd_interface}"

View File

@ -26,10 +26,10 @@ esac
ipmon_precmd()
{
# Make sure ipfilter is loaded before continuing
if ! sysctl net.inet.ipf.fr_pass >/dev/null 2>&1 ; then
return 1
fi
# Make sure ipfilter is loaded before continuing
if ! sysctl net.inet.ipf.fr_pass >/dev/null 2>&1; then
return 1
fi
return 0
}

View File

@ -35,7 +35,7 @@ extra_commands="reload"
ipnat_precmd()
{
# Make sure ipfilter is loaded before continuing
if ! ${SYSCTL} net.inet.ipf.fr_pass >/dev/null 2>&1 ; then
if ! ${SYSCTL} net.inet.ipf.fr_pass >/dev/null 2>&1; then
err 'ipnat requires ipfilter be loaded'
return 1
fi
@ -56,7 +56,7 @@ ipnat_start()
echo '.'
# restore filter/NAT state tables after loading the rules
if checkyesno ipfs_enable ; then
if checkyesno ipfs_enable; then
if [ -r "/var/db/ipf/ipstate.ipf" ]; then
echo -n ' ipfs'
${ipfs_program:-/sbin/ipfs} -R ${ipfs_flags}

View File

@ -65,7 +65,7 @@ isdnd_start()
# Start isdntrace
#
if checkyesno isdn_trace ; then
if checkyesno isdn_trace; then
echo -n ' isdntrace'
nohup /usr/sbin/isdntrace ${isdn_traceflags} >/dev/null 2>&1 &
echo '.'

View File

@ -35,7 +35,7 @@ mountcritremote_precmd()
case "`mount -d -a -t nfs 2> /dev/null`" in
*mount_nfs*)
# Handle absent nfs client support
if ! sysctl vfs.nfs >/dev/null 2>&1 ; then
if ! sysctl vfs.nfs >/dev/null 2>&1; then
kldload nfsclient || warn 'nfs mount ' \
'requested, but no nfs client in kernel' \
return 1
@ -55,7 +55,7 @@ mountcritremote_start()
mount -a -t nfs
echo '.'
# Mount other network filesystems if present in /etc/fstab
# Mount other network filesystems if present in /etc/fstab.
for i in ${networkfs_types}; do
fstype=${i%:*}
fsdecr=${i#*:}
@ -71,7 +71,7 @@ mountcritremote_start()
esac
done
# Cleanup /var again just in case it's a network mount
# Cleanup /var again just in case it's a network mount.
/etc/rc.d/cleanvar start
rm -f /var/run/clean_var /var/spool/lock/clean_var
;;

View File

@ -23,7 +23,7 @@ mountd_precmd()
FreeBSD)
if ! checkyesno rpcbind_enable && \
! /etc/rc.d/rpcbind forcestatus 1>/dev/null 2>&1
then
then
force_depend rpcbind || return 1
fi
@ -31,12 +31,12 @@ mountd_precmd()
#
case ${nfs_server_enable} in
[Yy][Ee][Ss])
if checkyesno weak_mountd_authentication ; then
if checkyesno weak_mountd_authentication; then
mountd_flags="${mountd_flags} -n"
fi
;;
*)
if checkyesno mountd_enable ; then
if checkyesno mountd_enable; then
checkyesno weak_mountd_authentication && mountd_flags="-n"
fi
esac

View File

@ -52,18 +52,18 @@ chroot_autoupdate()
cp -p /usr/libexec/named-xfer "${named_chrootdir}/usr/libexec"
fi
# Copy /dev/null over, if neccessary. Preserve everything (perms,
# ownership, mod times).
#
if [ ! -c "${named_chrootdir}/dev/null" ]; then
rm -f "${named_chrootdir}/dev/null"
( cd /dev ; /bin/pax -rw -pe null "${named_chrootdir}/dev" )
fi
# Copy /dev/null over, if neccessary. Preserve everything (perms,
# ownership, mod times).
#
if [ ! -c "${named_chrootdir}/dev/null" ]; then
rm -f "${named_chrootdir}/dev/null"
( cd /dev ; /bin/pax -rw -pe null "${named_chrootdir}/dev" )
fi
# Copy local timezone information if it's not up-to-date.
#
if [ -f /etc/localtime ]; then
cmp -s /etc/localtime "${named_chrootdir}/etc/localtime" || \
# Copy local timezone information if it's not up-to-date.
#
if [ -f /etc/localtime ]; then
cmp -s /etc/localtime "${named_chrootdir}/etc/localtime" || \
cp -p /etc/localtime "${named_chrootdir}/etc/localtime"
fi
}

View File

@ -28,8 +28,8 @@ case ${log_in_vain} in
esac
[ "${log_in_vain}" -ne 0 ] && (
echo -n " log_in_vain=${log_in_vain}"
sysctl net.inet.tcp.log_in_vain="${log_in_vain}" >/dev/null
sysctl net.inet.udp.log_in_vain="${log_in_vain}" >/dev/null
echo -n " log_in_vain=${log_in_vain}"
sysctl net.inet.tcp.log_in_vain="${log_in_vain}" >/dev/null
sysctl net.inet.udp.log_in_vain="${log_in_vain}" >/dev/null
)
echo '.'

View File

@ -15,50 +15,50 @@ stop_cmd="network_stop"
convert_host_conf()
{
host_conf=$1; shift;
nsswitch_conf=$1; shift;
awk ' \
/^[:blank:]*#/ { next } \
/(hosts|local|file)/ { nsswitch[c] = "files"; c++; next } \
/(dns|bind)/ { nsswitch[c] = "dns"; c++; next } \
/nis/ { nsswitch[c] = "nis"; c++; next } \
{ printf "Warning: unrecognized line [%s]", $0 > "/dev/stderr" } \
END { \
printf "hosts: "; \
for (i in nsswitch) printf "%s ", nsswitch[i]; \
printf "\n"; \
}' < $host_conf > $nsswitch_conf
host_conf=$1; shift;
nsswitch_conf=$1; shift;
awk ' \
/^[:blank:]*#/ { next } \
/(hosts|local|file)/ { nsswitch[c] = "files"; c++; next } \
/(dns|bind)/ { nsswitch[c] = "dns"; c++; next } \
/nis/ { nsswitch[c] = "nis"; c++; next } \
{ printf "Warning: unrecognized line [%s]", $0 > "/dev/stderr" } \
END { \
printf "hosts: "; \
for (i in nsswitch) printf "%s ", nsswitch[i]; \
printf "\n"; \
}' < $host_conf > $nsswitch_conf
}
generate_host_conf()
{
nsswitch_conf=$1; shift;
host_conf=$1; shift;
nsswitch_conf=$1; shift;
host_conf=$1; shift;
awk '
BEGIN {
xlat["files"] = "hosts";
xlat["dns"] = "bind";
xlat["nis"] = "nis";
cont = 0;
}
sub(/^[\t ]*hosts:/, "") || cont {
if (!cont)
srcs = ""
sub(/#.*/, "")
gsub(/[][]/, " & ")
cont = sub(/\\$/, "")
srcs = srcs " " $0
}
END {
print "# Auto-generated from nsswitch.conf, do not edit"
ns = split(srcs, s)
for (n = 1; n <= ns; ++n) {
if (s[n] in xlat)
print xlat[s[n]]
}
}
' <$nsswitch_conf >$host_conf
awk '
BEGIN {
xlat["files"] = "hosts";
xlat["dns"] = "bind";
xlat["nis"] = "nis";
cont = 0;
}
sub(/^[\t ]*hosts:/, "") || cont {
if (!cont)
srcs = ""
sub(/#.*/, "")
gsub(/[][]/, " & ")
cont = sub(/\\$/, "")
srcs = srcs " " $0
}
END {
print "# Auto-generated from nsswitch.conf, do not edit"
ns = split(srcs, s)
for (n = 1; n <= ns; ++n) {
if (s[n] in xlat)
print xlat[s[n]]
}
}
' <$nsswitch_conf >$host_conf
}
network_gif_setup() {

View File

@ -28,8 +28,8 @@ case ${log_in_vain} in
esac
[ "${log_in_vain}" -ne 0 ] && (
echo -n " log_in_vain=${log_in_vain}"
sysctl net.inet.tcp.log_in_vain="${log_in_vain}" >/dev/null
sysctl net.inet.udp.log_in_vain="${log_in_vain}" >/dev/null
echo -n " log_in_vain=${log_in_vain}"
sysctl net.inet.tcp.log_in_vain="${log_in_vain}" >/dev/null
sysctl net.inet.udp.log_in_vain="${log_in_vain}" >/dev/null
)
echo '.'

View File

@ -200,14 +200,14 @@ network6_stf_setup()
network6_static_routes_setup()
{
# Set up any static routes.
case ${ipv6_defaultrouter} in
[Nn][Oo] | '')
;;
*)
ipv6_static_routes="default ${ipv6_static_routes}"
ipv6_route_default="default ${ipv6_defaultrouter}"
;;
esac
case ${ipv6_defaultrouter} in
[Nn][Oo] | '')
;;
*)
ipv6_static_routes="default ${ipv6_static_routes}"
ipv6_route_default="default ${ipv6_defaultrouter}"
;;
esac
case ${ipv6_static_routes} in
[Nn][Oo] | '')
;;
@ -343,7 +343,7 @@ network_ipv6_start()
;;
esac
if checkyesno ipv6_gateway_enable ; then
if checkyesno ipv6_gateway_enable; then
# act as a router
${SYSCTL_W} net.inet6.ip6.forwarding=1
${SYSCTL_W} net.inet6.ip6.accept_rtadv=0
@ -371,7 +371,7 @@ network_ipv6_start()
fi
# Filter out interfaces on which IPv6 initialization failed.
if checkyesno ipv6_gateway_enable ; then
if checkyesno ipv6_gateway_enable; then
ipv6_working_interfaces=""
for i in ${ipv6_network_interfaces}; do
laddr=`network6_getladdr $i exclude_tentative`
@ -401,7 +401,7 @@ network_ipv6_start()
network6_faith_setup
# Support for IPv4 address tacked onto an IPv6 address
if checkyesno ipv6_ipv4mapping ; then
if checkyesno ipv6_ipv4mapping; then
echo 'IPv4 mapped IPv6 address support=YES'
${SYSCTL_W} net.inet6.ip6.v6only=0 >/dev/null
else

View File

@ -19,12 +19,12 @@ stop_cmd="unmount_all"
nfsclient_precmd()
{
if ! sysctl vfs.nfs >/dev/null 2>&1; then
if ! kldload nfsclient ; then
if ! kldload nfsclient; then
warn 'Could not load nfs client module'
return 1
fi
fi
return 0
return 0
}
nfsclient_start()

View File

@ -44,7 +44,7 @@ nfsd_precmd()
force_depend mountd || return 1
fi
if checkyesno nfs_reserved_port_only ; then
if checkyesno nfs_reserved_port_only; then
echo 'NFS on reserved port only=YES'
sysctl vfs.nfsrv.nfs_privport=1 > /dev/null
fi

View File

@ -18,12 +18,12 @@ stop_cmd=":"
nfsserver_start()
{
if ! sysctl vfs.nfsrv >/dev/null 2>&1; then
if ! kldload nfsserver ; then
if ! kldload nfsserver; then
warn 'Could not load NFS server module'
return 1
fi
fi
return 0
return 0
}
load_rc_config $name

View File

@ -30,7 +30,7 @@ ntpd_precmd()
fi
# If running in a chroot cage, ensure that the appropriate files
# exist inside the cage, as well as helper symlinks into the cage
# exist inside the cage, as well as helper symlinks into the cage
# from outside.
#
# As this is called after the is_running and required_dir checks

View File

@ -29,8 +29,8 @@ ntpdate_start()
{
if [ -z "$ntpdate_hosts" ]; then
ntpdate_hosts=`awk '
/^server[ \t]*127.127/ {next}
/^(server|peer)/ {print $2}
/^server[ \t]*127.127/ {next}
/^(server|peer)/ {print $2}
' </etc/ntp.conf`
fi
if [ -n "$ntpdate_hosts" ]; then

View File

@ -39,7 +39,7 @@ stop_cmd=":"
pccard_start()
{
if checkyesno pccard_enable ; then
if checkyesno pccard_enable; then
echo -n 'Setup PC-CARD:'
case ${pccard_mem} in
@ -51,7 +51,7 @@ pccard_start()
;;
esac
if [ -n "${pccard_beep}" ] ; then
if [ -n "${pccard_beep}" ]; then
pccardc beep ${pccard_beep} && echo -n ' beep'
fi

View File

@ -63,7 +63,7 @@ pcvt_start()
echo "-n" "Configuring pcvt"
fi
# video adapter type
# video adapter type
adapter=`/usr/sbin/scon -d /dev/ttyv0 -a`
@ -77,7 +77,7 @@ pcvt_start()
# load fonts into VGA
if [ $adapter = VGA ] ; then
if [ $adapter = VGA ]; then
pcvt_echo "-n" " loading fonts: 8x16:0,"
loadfont -d /dev/ttyv0 -c0 -f $FONTP/vt220l.816
@ -141,7 +141,7 @@ pcvt_start()
# set emulation
/usr/sbin/scon -d$device $size $emulation >/dev/null 2>&1
if [ $? != 0 ] ; then
if [ $? != 0 ]; then
break 1
fi
@ -160,7 +160,6 @@ pcvt_start()
esac
;;
esac
# on monochrome monitor, set color palette to use a higher intensity

View File

@ -19,9 +19,9 @@ ppp_start()
# Establish ppp mode.
#
if [ "${ppp_mode}" != "ddial" -a "${ppp_mode}" != "direct" \
-a "${ppp_mode}" != "dedicated" \
-a "${ppp_mode}" != "background" ]; then
ppp_mode="auto"
-a "${ppp_mode}" != "dedicated" \
-a "${ppp_mode}" != "background" ]; then
ppp_mode="auto"
fi
ppp_command="/usr/sbin/ppp -quiet -${ppp_mode}"

View File

@ -19,9 +19,9 @@ ppp_start()
# Establish ppp mode.
#
if [ "${ppp_mode}" != "ddial" -a "${ppp_mode}" != "direct" \
-a "${ppp_mode}" != "dedicated" \
-a "${ppp_mode}" != "background" ]; then
ppp_mode="auto"
-a "${ppp_mode}" != "dedicated" \
-a "${ppp_mode}" != "background" ]; then
ppp_mode="auto"
fi
ppp_command="/usr/sbin/ppp -quiet -${ppp_mode}"

View File

@ -20,7 +20,7 @@ stop_cmd="/usr/sbin/quotaoff -a"
quota_start()
{
if checkyesno check_quotas ; then
if checkyesno check_quotas; then
echo -n 'Checking quotas:'
quotacheck -a
echo ' done.'

View File

@ -63,13 +63,13 @@ random_stop()
rm -f ${entropy_file}
oumask=`umask`
umask 077
if touch ${entropy_file} ; then
if touch ${entropy_file}; then
entropy_file_confirmed="${entropy_file}"
else
# Try this as a reasonable alternative for read-only
# roots, diskless workstations, etc.
rm -f /var/db/entropy
if touch /var/db/entropy ; then
if touch /var/db/entropy; then
entropy_file_confirmed=/var/db/entropy
fi
fi

View File

@ -55,8 +55,8 @@ mount_md()
# If there is a global system configuration file, suck it in.
#
if [ -r /etc/rc.subr ]; then
. /etc/rc.subr
load_rc_config $name
. /etc/rc.subr
load_rc_config $name
elif [ -r /etc/defaults/rc.conf ]; then
. /etc/defaults/rc.conf
source_rc_confs
@ -108,7 +108,7 @@ if [ ! -L /tmp ]; then
chmod 01777 /tmp
fi
if sysctl vfs.devfs.generation > /dev/null 2>&1 ; then
if sysctl vfs.devfs.generation > /dev/null 2>&1; then
# we have DEVFS, no worries...
true
else

View File

@ -25,7 +25,7 @@ root_start()
[Nn][Oo] | '')
;;
*)
if ! mount -u -o rw / ; then
if ! mount -u -o rw /; then
echo 'Mounting root filesystem rw failed, startup aborted'
exit 1
fi

View File

@ -27,25 +27,25 @@ esac
rtadvd_precmd()
{
if ! ${IS_GATEWAY} ; then
if ! ${IS_GATEWAY}; then
warn \
"${name} cannot be used on IPv6 host, only on an IPv6 router."
return 1
fi
# This should be enabled with a great care.
# You may want to fine-tune /etc/rtadvd.conf.
#
# And if you wish your rtadvd to receive and process
# router renumbering messages, specify your Router Renumbering
# security policy by -R option.
#
# See `man 3 ipsec_set_policy` for IPsec policy specification
# details.
# (CAUTION: This enables your routers prefix renumbering
# from another machine, so if you enable this, do it with
# enough care.)
#
# This should be enabled with a great care.
# You may want to fine-tune /etc/rtadvd.conf.
#
# And if you wish your rtadvd to receive and process
# router renumbering messages, specify your Router Renumbering
# security policy by -R option.
#
# See `man 3 ipsec_set_policy` for IPsec policy specification
# details.
# (CAUTION: This enables your routers prefix renumbering
# from another machine, so if you enable this, do it with
# enough care.)
#
case ${OSTYPE} in
FreeBSD)
# If specific interfaces haven't been specified,

View File

@ -86,7 +86,7 @@ run_rc_command "$1"
case ${OSTYPE} in
FreeBSD)
required_files=
if ! checkyesno sendmail_enable; then
name="sendmail_submit"
rcvar=`set_rcvar`

View File

@ -151,7 +151,7 @@ terminal() {
# modem c c 00 01 02 03 04 05 06 07
# Initialize all ports on a Cyclades-16ye.
# modem c c 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f
# modem c c 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f
# Initialize all ports on a Digiboard 8.
# modem D D 00 01 02 03 04 05 06 07

View File

@ -55,8 +55,8 @@ mount_md()
# If there is a global system configuration file, suck it in.
#
if [ -r /etc/rc.subr ]; then
. /etc/rc.subr
load_rc_config $name
. /etc/rc.subr
load_rc_config $name
elif [ -r /etc/defaults/rc.conf ]; then
. /etc/defaults/rc.conf
source_rc_confs
@ -108,7 +108,7 @@ if [ ! -L /tmp ]; then
chmod 01777 /tmp
fi
if sysctl vfs.devfs.generation > /dev/null 2>&1 ; then
if sysctl vfs.devfs.generation > /dev/null 2>&1; then
# we have DEVFS, no worries...
true
else

View File

@ -55,8 +55,8 @@ mount_md()
# If there is a global system configuration file, suck it in.
#
if [ -r /etc/rc.subr ]; then
. /etc/rc.subr
load_rc_config $name
. /etc/rc.subr
load_rc_config $name
elif [ -r /etc/defaults/rc.conf ]; then
. /etc/defaults/rc.conf
source_rc_confs
@ -108,7 +108,7 @@ if [ ! -L /tmp ]; then
chmod 01777 /tmp
fi
if sysctl vfs.devfs.generation > /dev/null 2>&1 ; then
if sysctl vfs.devfs.generation > /dev/null 2>&1; then
# we have DEVFS, no worries...
true
else

View File

@ -139,16 +139,16 @@ wscons_start()
mapfile)
mapfile=$arg1
( while read entry; do
case "$entry" in
\#*|"")
continue
;;
case "$entry" in
\#*|"")
continue
;;
*)
cmd="$wsctl -w \"map+=$entry\""
cmd="$cmd >/dev/null"
eval $DOIT $cmd
;;
esac
cmd="$wsctl -w \"map+=$entry\""
cmd="$cmd >/dev/null"
eval $DOIT $cmd
;;
esac
done ) < $mapfile
;;

View File

@ -27,8 +27,8 @@ esac
ypserv_precmd()
{
case ${OSTYPE} in
FreeBSD)
case ${OSTYPE} in
FreeBSD)
if ! checkyesno rpcbind_enable && \
! /etc/rc.d/rpcbind forcestatus 1>/dev/null 2>&1
then

View File

@ -28,11 +28,11 @@ ypset_precmd()
force_depend ypbind || return 1
fi
_domain=`domainname`
if [ -z "$_domain" ]; then
warn "domainname(1) is not set."
return 1
fi
_domain=`domainname`
if [ -z "$_domain" ]; then
warn "domainname(1) is not set."
return 1
fi
}
load_rc_config $name

View File

@ -27,11 +27,11 @@ rpc_ypupdated_precmd()
force_depend ypserv || return 1
fi
_domain=`domainname`
if [ -z "$_domain" ]; then
warn "domainname(1) is not set."
return 1
fi
_domain=`domainname`
if [ -z "$_domain" ]; then
warn "domainname(1) is not set."
return 1
fi
}
load_rc_config $name

View File

@ -28,11 +28,11 @@ ypxfrd_precmd()
force_depend ypserv || return 1
fi
_domain=`domainname`
if [ -z "$_domain" ]; then
warn "domainname(1) is not set."
return 1
fi
_domain=`domainname`
if [ -z "$_domain" ]; then
warn "domainname(1) is not set."
return 1
fi
}
load_rc_config $name

View File

@ -81,19 +81,19 @@ bootp_ipa=""
bootp_ipbca=""
iflist=`ifconfig -l`
for i in ${iflist} ; do
set `ifconfig ${i}`
while [ $# -ge 1 ] ; do
if [ "${bootp_ifc}" = "" -a "$1" = "inet" ] ; then
bootp_ifc=${i} ; bootp_ipa=${2} ; shift
fi
if [ "${bootp_ipbca}" = "" -a "$1" = "broadcast" ] ; then
bootp_ipbca=$2; shift
fi
shift
done
if [ "${bootp_ifc}" != "" ] ; then
break
fi
set `ifconfig ${i}`
while [ $# -ge 1 ] ; do
if [ "${bootp_ifc}" = "" -a "$1" = "inet" ]; then
bootp_ifc=${i} ; bootp_ipa=${2} ; shift
fi
if [ "${bootp_ipbca}" = "" -a "$1" = "broadcast" ]; then
bootp_ipbca=$2; shift
fi
shift
done
if [ "${bootp_ifc}" != "" ]; then
break
fi
done
echo "Interface ${bootp_ifc} IP-Address ${bootp_ipa} Broadcast ${bootp_ipbca}"