more whitespace cleanup
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
This commit is contained in:
parent
711713d664
commit
faa2df1159
@ -23,7 +23,7 @@
|
|||||||
# We now support modular networking scripts which means we can easily
|
# We now support modular networking scripts which means we can easily
|
||||||
# add support for new interface types and modules while keeping
|
# add support for new interface types and modules while keeping
|
||||||
# compatibility with existing ones.
|
# compatibility with existing ones.
|
||||||
#
|
#
|
||||||
# Modules load by default if the package they need is installed. If
|
# Modules load by default if the package they need is installed. If
|
||||||
# you specify a module here that doesn't have its package installed
|
# you specify a module here that doesn't have its package installed
|
||||||
# then you get an error stating which package you need to install.
|
# then you get an error stating which package you need to install.
|
||||||
@ -212,7 +212,7 @@
|
|||||||
# not find them in a scan
|
# not find them in a scan
|
||||||
# "forcepreferredonly" means it forcibly connects to the APs in order and
|
# "forcepreferredonly" means it forcibly connects to the APs in order and
|
||||||
# does not bother to scan
|
# does not bother to scan
|
||||||
# "forceany" does the same as forcepreferred + connects to any other
|
# "forceany" does the same as forcepreferred + connects to any other
|
||||||
# available AP
|
# available AP
|
||||||
# Default is "any"
|
# Default is "any"
|
||||||
#associate_order="any"
|
#associate_order="any"
|
||||||
@ -266,13 +266,13 @@
|
|||||||
# won't have associated then)
|
# won't have associated then)
|
||||||
|
|
||||||
# If you're using anything else to configure wireless on your interface AND
|
# If you're using anything else to configure wireless on your interface AND
|
||||||
# you have installed wpa_supplicant, you need to disable wpa_supplicant
|
# you have installed wpa_supplicant, you need to disable wpa_supplicant
|
||||||
#modules="!iwconfig !wpa_supplicant"
|
#modules="!iwconfig !wpa_supplicant"
|
||||||
#or
|
#or
|
||||||
#modules="!wireless"
|
#modules="!wireless"
|
||||||
|
|
||||||
##############################################################################
|
##############################################################################
|
||||||
# WIRELESS SSID IN VARIABLES
|
# WIRELESS SSID IN VARIABLES
|
||||||
##############################################################################
|
##############################################################################
|
||||||
# Remember to change SSID to your SSID.
|
# Remember to change SSID to your SSID.
|
||||||
# Say that your SSID is My NET - the line
|
# Say that your SSID is My NET - the line
|
||||||
@ -368,7 +368,7 @@
|
|||||||
|
|
||||||
##############################################################################
|
##############################################################################
|
||||||
# ADVANCED CONFIGURATION
|
# ADVANCED CONFIGURATION
|
||||||
#
|
#
|
||||||
# Four functions can be defined which will be called surrounding the
|
# Four functions can be defined which will be called surrounding the
|
||||||
# start/stop operations. The functions are called with the interface
|
# start/stop operations. The functions are called with the interface
|
||||||
# name first so that one function can control multiple adapters. An extra two
|
# name first so that one function can control multiple adapters. An extra two
|
||||||
|
@ -24,7 +24,7 @@
|
|||||||
# We now support modular networking scripts which means we can easily
|
# We now support modular networking scripts which means we can easily
|
||||||
# add support for new interface types and modules while keeping
|
# add support for new interface types and modules while keeping
|
||||||
# compatibility with existing ones.
|
# compatibility with existing ones.
|
||||||
#
|
#
|
||||||
# Modules load by default if the package they need is installed. If
|
# Modules load by default if the package they need is installed. If
|
||||||
# you specify a module here that doesn't have its package installed
|
# you specify a module here that doesn't have its package installed
|
||||||
# then you get an error stating which package you need to install.
|
# then you get an error stating which package you need to install.
|
||||||
@ -49,7 +49,7 @@
|
|||||||
|
|
||||||
##############################################################################
|
##############################################################################
|
||||||
# INTERFACE HANDLERS
|
# INTERFACE HANDLERS
|
||||||
#
|
#
|
||||||
# We provide two interface handlers presently: ifconfig and iproute2.
|
# We provide two interface handlers presently: ifconfig and iproute2.
|
||||||
# You need one of these to do any kind of network configuration.
|
# You need one of these to do any kind of network configuration.
|
||||||
# For ifconfig support, emerge sys-apps/net-tools
|
# For ifconfig support, emerge sys-apps/net-tools
|
||||||
@ -297,7 +297,7 @@
|
|||||||
# Surround each SSID with the " character and separate them with a space
|
# Surround each SSID with the " character and separate them with a space
|
||||||
# If the first SSID isn't found then it moves onto the next
|
# If the first SSID isn't found then it moves onto the next
|
||||||
# If this isn't defined then it connects to the first one found
|
# If this isn't defined then it connects to the first one found
|
||||||
#preferred_aps="SSID1 SSID2"
|
#preferred_aps="SSID1 SSID2"
|
||||||
|
|
||||||
# You can also define a preferred_aps list per interface
|
# You can also define a preferred_aps list per interface
|
||||||
#preferred_aps_eth0="SSID3 SSID4"
|
#preferred_aps_eth0="SSID3 SSID4"
|
||||||
@ -371,13 +371,13 @@
|
|||||||
# won't have associated then)
|
# won't have associated then)
|
||||||
|
|
||||||
# If you're using anything else to configure wireless on your interface AND
|
# If you're using anything else to configure wireless on your interface AND
|
||||||
# you have installed wpa_supplicant, you need to disable wpa_supplicant
|
# you have installed wpa_supplicant, you need to disable wpa_supplicant
|
||||||
#modules="!iwconfig !wpa_supplicant"
|
#modules="!iwconfig !wpa_supplicant"
|
||||||
#or
|
#or
|
||||||
#modules="!wireless"
|
#modules="!wireless"
|
||||||
|
|
||||||
##############################################################################
|
##############################################################################
|
||||||
# WIRELESS SSID IN VARIABLES
|
# WIRELESS SSID IN VARIABLES
|
||||||
##############################################################################
|
##############################################################################
|
||||||
# Remember to change SSID to your SSID.
|
# Remember to change SSID to your SSID.
|
||||||
# Say that your SSID is My NET - the line
|
# Say that your SSID is My NET - the line
|
||||||
@ -421,7 +421,7 @@
|
|||||||
# Notes:
|
# Notes:
|
||||||
# - All clients send the current hostname to the DHCP server by default
|
# - All clients send the current hostname to the DHCP server by default
|
||||||
# - dhcpcd does not daemonize when the lease time is infinite
|
# - dhcpcd does not daemonize when the lease time is infinite
|
||||||
# - udhcp-0.9.3-r3 and earlier do not support getting NTP servers
|
# - udhcp-0.9.3-r3 and earlier do not support getting NTP servers
|
||||||
# - pump does not support getting NIS servers
|
# - pump does not support getting NIS servers
|
||||||
# - DHCP tends to erase any existing device information - so add
|
# - DHCP tends to erase any existing device information - so add
|
||||||
# static addresses after dhcp if you need them
|
# static addresses after dhcp if you need them
|
||||||
@ -467,7 +467,7 @@
|
|||||||
#fallback_eth0="apipa"
|
#fallback_eth0="apipa"
|
||||||
|
|
||||||
#-----------------------------------------------------------------------------
|
#-----------------------------------------------------------------------------
|
||||||
# ARPING Gateway configuration
|
# ARPING Gateway configuration
|
||||||
# and
|
# and
|
||||||
# Automatic Private IP Addressing (APIPA)
|
# Automatic Private IP Addressing (APIPA)
|
||||||
# For arpingnet / apipa support, emerge net-misc/iputils or net-analyzer/arping
|
# For arpingnet / apipa support, emerge net-misc/iputils or net-analyzer/arping
|
||||||
@ -582,7 +582,7 @@
|
|||||||
|
|
||||||
|
|
||||||
#-----------------------------------------------------------------------------
|
#-----------------------------------------------------------------------------
|
||||||
# Classical IP over ATM
|
# Classical IP over ATM
|
||||||
# For CLIP support emerge net-dialup/linux-atm
|
# For CLIP support emerge net-dialup/linux-atm
|
||||||
|
|
||||||
# Ensure that you have /etc/atmsigd.conf setup correctly
|
# Ensure that you have /etc/atmsigd.conf setup correctly
|
||||||
@ -620,7 +620,7 @@
|
|||||||
#
|
#
|
||||||
# Here you should specify what pppd plugins you want to use
|
# Here you should specify what pppd plugins you want to use
|
||||||
# Available plugins are: pppoe, pppoa, capi, dhcpc, minconn, radius,
|
# Available plugins are: pppoe, pppoa, capi, dhcpc, minconn, radius,
|
||||||
# radattr, radrealms and winbind
|
# radattr, radrealms and winbind
|
||||||
#plugins_ppp0="pppoe" # Required plugin for PPPoE
|
#plugins_ppp0="pppoe" # Required plugin for PPPoE
|
||||||
#plugins_ppp0="pppoa vc-encaps" # Required plugin for PPPoA with an option
|
#plugins_ppp0="pppoa vc-encaps" # Required plugin for PPPoA with an option
|
||||||
#plugins_ppp0="capi" # Required plugin for ISDN
|
#plugins_ppp0="capi" # Required plugin for ISDN
|
||||||
@ -660,7 +660,7 @@
|
|||||||
# lcp-echo-interval 15 # Send a LCP echo every 15 seconds
|
# lcp-echo-interval 15 # Send a LCP echo every 15 seconds
|
||||||
# lcp-echo-failure 3 # Make peer dead after 3 consecutive
|
# lcp-echo-failure 3 # Make peer dead after 3 consecutive
|
||||||
# # echo-requests
|
# # echo-requests
|
||||||
#
|
#
|
||||||
# Compression options - use these to completely disable compression
|
# Compression options - use these to completely disable compression
|
||||||
# noaccomp noccp nobsdcomp nodeflate nopcomp novj novjccomp
|
# noaccomp noccp nobsdcomp nodeflate nopcomp novj novjccomp
|
||||||
#
|
#
|
||||||
@ -793,7 +793,7 @@
|
|||||||
# empty value variable is fine, but at least one of them must be set:
|
# empty value variable is fine, but at least one of them must be set:
|
||||||
# brctl_IFVAR
|
# brctl_IFVAR
|
||||||
|
|
||||||
# You need to configure the ports to null values so dhcp does not get started
|
# You need to configure the ports to null values so dhcp does not get started
|
||||||
#config_eth0="null"
|
#config_eth0="null"
|
||||||
#config_eth1="null"
|
#config_eth1="null"
|
||||||
|
|
||||||
@ -820,7 +820,7 @@
|
|||||||
#hairpin_mode_eth0="1"
|
#hairpin_mode_eth0="1"
|
||||||
|
|
||||||
#-----------------------------------------------------------------------------
|
#-----------------------------------------------------------------------------
|
||||||
# RFC 2684 Bridge Support
|
# RFC 2684 Bridge Support
|
||||||
# For RFC 2684 bridge support emerge net-misc/br2684ctl
|
# For RFC 2684 bridge support emerge net-misc/br2684ctl
|
||||||
|
|
||||||
# Interface names have to be of the form nas0, nas1, nas2, etc.
|
# Interface names have to be of the form nas0, nas1, nas2, etc.
|
||||||
@ -975,7 +975,7 @@
|
|||||||
|
|
||||||
##############################################################################
|
##############################################################################
|
||||||
# ADVANCED CONFIGURATION
|
# ADVANCED CONFIGURATION
|
||||||
#
|
#
|
||||||
# Four functions can be defined which will be called surrounding the
|
# Four functions can be defined which will be called surrounding the
|
||||||
# start/stop operations. The functions are called with the interface
|
# start/stop operations. The functions are called with the interface
|
||||||
# name first so that one function can control multiple adapters. An extra two
|
# name first so that one function can control multiple adapters. An extra two
|
||||||
@ -1001,7 +1001,7 @@
|
|||||||
# if mii-tool "${IFACE}" 2> /dev/null | grep -q 'no link'; then
|
# if mii-tool "${IFACE}" 2> /dev/null | grep -q 'no link'; then
|
||||||
# ewarn "No link on ${IFACE}, aborting configuration"
|
# ewarn "No link on ${IFACE}, aborting configuration"
|
||||||
# return 1
|
# return 1
|
||||||
# fi
|
# fi
|
||||||
#
|
#
|
||||||
# # Test for link on the interface prior to bringing it up. This
|
# # Test for link on the interface prior to bringing it up. This
|
||||||
# # only works on some network adapters and requires the ethtool
|
# # only works on some network adapters and requires the ethtool
|
||||||
|
@ -95,7 +95,7 @@
|
|||||||
# We can set some things on a per service basis, like the nicelevel.
|
# We can set some things on a per service basis, like the nicelevel.
|
||||||
#export SSD_NICELEVEL="-19"
|
#export SSD_NICELEVEL="-19"
|
||||||
|
|
||||||
# Pass ulimit parameters
|
# Pass ulimit parameters
|
||||||
#rc_ulimit="-u 30"
|
#rc_ulimit="-u 30"
|
||||||
|
|
||||||
# It's possible to define extra dependencies for services like so
|
# It's possible to define extra dependencies for services like so
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
# This gives us a nice colour boot :)
|
# This gives us a nice colour boot :)
|
||||||
[ -z "$TERM" -o "$TERM" = "dumb" ] && export TERM="@TERM@"
|
[ -z "$TERM" -o "$TERM" = "dumb" ] && export TERM="@TERM@"
|
||||||
|
|
||||||
# Handle interrupts
|
# Handle interrupts
|
||||||
trap : SIGINT
|
trap : SIGINT
|
||||||
trap "echo 'Boot interrupted'; exit 1" SIGQUIT
|
trap "echo 'Boot interrupted'; exit 1" SIGQUIT
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
# Copyright (c) 2007-2008 Roy Marples <roy@marples.name>
|
# Copyright (c) 2007-2008 Roy Marples <roy@marples.name>
|
||||||
# All rights reserved. Released under the 2-clause BSD license.
|
# All rights reserved. Released under the 2-clause BSD license.
|
||||||
|
|
||||||
# Handle interrupts
|
# Handle interrupts
|
||||||
trap : SIGINT SIGQUIT
|
trap : SIGINT SIGQUIT
|
||||||
|
|
||||||
# Try and use stuff in /lib over anywhere else so we can shutdown
|
# Try and use stuff in /lib over anywhere else so we can shutdown
|
||||||
|
@ -10,7 +10,7 @@ required_files=/etc/dnsmasq.conf
|
|||||||
extra_started_commands="reload"
|
extra_started_commands="reload"
|
||||||
|
|
||||||
depend()
|
depend()
|
||||||
{
|
{
|
||||||
provide dns
|
provide dns
|
||||||
need localmount net
|
need localmount net
|
||||||
after bootmisc
|
after bootmisc
|
||||||
|
@ -24,7 +24,7 @@ if yesno $openvpn_client; then
|
|||||||
command_args="$command_args --up $openvpn_up"
|
command_args="$command_args --up $openvpn_up"
|
||||||
command_args="$command_args --down $openvpn_down"
|
command_args="$command_args --down $openvpn_down"
|
||||||
required_files="$required_files $openvpn_up $openvpn_down"
|
required_files="$required_files $openvpn_up $openvpn_down"
|
||||||
|
|
||||||
in_background_fake="start stop"
|
in_background_fake="start stop"
|
||||||
start_inactive=YES
|
start_inactive=YES
|
||||||
fi
|
fi
|
||||||
@ -59,7 +59,7 @@ start_pre()
|
|||||||
sysctl -a | grep -q '\.tap\.' || kldload if_tap
|
sysctl -a | grep -q '\.tap\.' || kldload if_tap
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# If the config file does not specify the cd option, we do
|
# If the config file does not specify the cd option, we do
|
||||||
if ! grep -q "^[ \t]*cd[ \t].*" "$openvpn_config"; then
|
if ! grep -q "^[ \t]*cd[ \t].*" "$openvpn_config"; then
|
||||||
command_args="$command_args --cd $openvpn_dir"
|
command_args="$command_args --cd $openvpn_dir"
|
||||||
|
@ -31,5 +31,5 @@ start_pre()
|
|||||||
eend $? || return 1
|
eend $? || return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
$command -t
|
$command -t
|
||||||
}
|
}
|
||||||
|
@ -43,7 +43,7 @@ find_wireless()
|
|||||||
done
|
done
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
return 1
|
return 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
extra_commands="save"
|
extra_commands="save"
|
||||||
|
|
||||||
description="Sets the local clock to UTC or Local Time."
|
description="Sets the local clock to UTC or Local Time."
|
||||||
description_save="Saves the current time in the BIOS."
|
description_save="Saves the current time in the BIOS."
|
||||||
|
|
||||||
: ${clock:=${CLOCK:-UTC}}
|
: ${clock:=${CLOCK:-UTC}}
|
||||||
@ -26,7 +26,7 @@ depend()
|
|||||||
}
|
}
|
||||||
|
|
||||||
start()
|
start()
|
||||||
{
|
{
|
||||||
ebegin "Starting the System Clock Adjuster [${utc}]"
|
ebegin "Starting the System Clock Adjuster [${utc}]"
|
||||||
if [ "$clock" != "UTC" ]; then
|
if [ "$clock" != "UTC" ]; then
|
||||||
echo >/etc/wall_cmos_clock
|
echo >/etc/wall_cmos_clock
|
||||||
|
@ -88,7 +88,7 @@ start()
|
|||||||
eend 1 "failed to create needed directory $x"
|
eend 1 "failed to create needed directory $x"
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
if dir_writeable /var/run; then
|
if dir_writeable /var/run; then
|
||||||
@ -137,7 +137,7 @@ start()
|
|||||||
# Make sure our X11 stuff have the correct permissions
|
# Make sure our X11 stuff have the correct permissions
|
||||||
# Omit the chown as bootmisc is run before network is up
|
# Omit the chown as bootmisc is run before network is up
|
||||||
# and users may be using lame LDAP auth #139411
|
# and users may be using lame LDAP auth #139411
|
||||||
rm -rf /tmp/.ICE-unix /tmp/.X11-unix
|
rm -rf /tmp/.ICE-unix /tmp/.X11-unix
|
||||||
mkdir -p /tmp/.ICE-unix /tmp/.X11-unix
|
mkdir -p /tmp/.ICE-unix /tmp/.X11-unix
|
||||||
chmod 1777 /tmp/.ICE-unix /tmp/.X11-unix
|
chmod 1777 /tmp/.ICE-unix /tmp/.X11-unix
|
||||||
if [ -x /sbin/restorecon ]; then
|
if [ -x /sbin/restorecon ]; then
|
||||||
|
@ -68,7 +68,7 @@ reset()
|
|||||||
start()
|
start()
|
||||||
{
|
{
|
||||||
if [ -r "$hostid_file" ]; then
|
if [ -r "$hostid_file" ]; then
|
||||||
_set $(cat "$hostid_file")
|
_set $(cat "$hostid_file")
|
||||||
else
|
else
|
||||||
reset
|
reset
|
||||||
fi
|
fi
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
extra_commands="save show"
|
extra_commands="save show"
|
||||||
|
|
||||||
description="Sets the local clock to UTC or Local Time."
|
description="Sets the local clock to UTC or Local Time."
|
||||||
description_save="Saves the current time in the BIOS."
|
description_save="Saves the current time in the BIOS."
|
||||||
description_show="Displays the current time in the BIOS."
|
description_show="Displays the current time in the BIOS."
|
||||||
|
|
||||||
@ -87,7 +87,7 @@ start()
|
|||||||
_hwclock --adjust $utc_cmd
|
_hwclock --adjust $utc_cmd
|
||||||
retval=$(($retval + $?))
|
retval=$(($retval + $?))
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# If setting UTC, don't bother to run hwclock when first booting
|
# If setting UTC, don't bother to run hwclock when first booting
|
||||||
# as that's the default
|
# as that's the default
|
||||||
if [ "$PREVLEVEL" != N -o \
|
if [ "$PREVLEVEL" != N -o \
|
||||||
@ -97,7 +97,7 @@ start()
|
|||||||
_hwclock --hctosys $utc_cmd $clock_args
|
_hwclock --hctosys $utc_cmd $clock_args
|
||||||
retval=$(($retval + $?))
|
retval=$(($retval + $?))
|
||||||
fi
|
fi
|
||||||
|
|
||||||
eend $retval "Failed to set the system clock"
|
eend $retval "Failed to set the system clock"
|
||||||
|
|
||||||
return 0
|
return 0
|
||||||
@ -126,7 +126,7 @@ stop()
|
|||||||
_hwclock --systohc $utc_cmd $clock_args
|
_hwclock --systohc $utc_cmd $clock_args
|
||||||
retval=$?
|
retval=$?
|
||||||
|
|
||||||
eend $retval "Failed to sync clocks"
|
eend $retval "Failed to sync clocks"
|
||||||
}
|
}
|
||||||
|
|
||||||
save()
|
save()
|
||||||
|
@ -40,11 +40,11 @@ init() {
|
|||||||
ipfw add deny all from any to 127.0.0.0/8
|
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 deny ip from 127.0.0.0/8 to any
|
||||||
|
|
||||||
if have_ip6; then
|
if have_ip6; then
|
||||||
ipfw add pass ip6 from any to any via lo0
|
ipfw add pass ip6 from any to any via lo0
|
||||||
ipfw add deny ip6 from any to ::1
|
ipfw add deny ip6 from any to ::1
|
||||||
ipfw add deny ip6 from ::1 to any
|
ipfw add deny ip6 from ::1 to any
|
||||||
|
|
||||||
ipfw add pass ip6 from :: to ff02::/16 proto ipv6-icmp
|
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 fe80::/10 proto ipv6-icmp
|
||||||
ipfw add pass ip6 from fe80::/10 to ff02::/16 proto ipv6-icmp
|
ipfw add pass ip6 from fe80::/10 to ff02::/16 proto ipv6-icmp
|
||||||
@ -78,7 +78,7 @@ start() {
|
|||||||
ipfw add pass udp from 0.0.0.0 68 to 255.255.255.255 67 out
|
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 me 68 in
|
||||||
ipfw add pass udp from any 67 to 255.255.255.255 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
|
# Some servers will ping the IP while trying to decide if it's
|
||||||
# still in use.
|
# still in use.
|
||||||
ipfw add pass icmp from any to any icmptype 8
|
ipfw add pass icmp from any to any icmptype 8
|
||||||
|
|
||||||
@ -88,11 +88,11 @@ start() {
|
|||||||
if have_ip6; then
|
if have_ip6; then
|
||||||
# Allow ICMPv6 destination unreach
|
# Allow ICMPv6 destination unreach
|
||||||
ipfw add pass ip6 from any to any icmp6types 1 proto ipv6-icmp
|
ipfw add pass ip6 from any to any icmp6types 1 proto ipv6-icmp
|
||||||
|
|
||||||
# Allow NS/NA/toobig (don't filter it out)
|
# Allow NS/NA/toobig (don't filter it out)
|
||||||
ipfw add pass ip6 from any to any icmp6types 2,135,136 proto ipv6-icmp
|
ipfw add pass ip6 from any to any icmp6types 2,135,136 proto ipv6-icmp
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Add permits for this workstations published services below
|
# Add permits for this workstations published services below
|
||||||
# Only IPs and nets in firewall_allowservices is allowed in.
|
# Only IPs and nets in firewall_allowservices is allowed in.
|
||||||
for i in $ipfw_ip_in; do
|
for i in $ipfw_ip_in; do
|
||||||
@ -107,7 +107,7 @@ start() {
|
|||||||
for i in $ipfw_ip_trust; do
|
for i in $ipfw_ip_trust; do
|
||||||
ipfw add pass ip from $i to me
|
ipfw add pass ip from $i to me
|
||||||
done
|
done
|
||||||
|
|
||||||
ipfw add 65000 count ip from any to any
|
ipfw add 65000 count ip from any to any
|
||||||
|
|
||||||
# Drop packets to ports where we don't want logging
|
# Drop packets to ports where we don't want logging
|
||||||
@ -117,7 +117,7 @@ start() {
|
|||||||
|
|
||||||
# Broadcasts and muticasts
|
# Broadcasts and muticasts
|
||||||
ipfw add deny ip from any to 255.255.255.255
|
ipfw add deny ip from any to 255.255.255.255
|
||||||
ipfw add deny ip from any to 224.0.0.0/24
|
ipfw add deny ip from any to 224.0.0.0/24
|
||||||
|
|
||||||
# Noise from routers
|
# Noise from routers
|
||||||
ipfw add deny udp from any to any 520 in
|
ipfw add deny udp from any to any 520 in
|
||||||
|
@ -17,7 +17,7 @@ start()
|
|||||||
: ${unicode:=$UNICODE}
|
: ${unicode:=$UNICODE}
|
||||||
: ${keymap:=$KEYMAP}
|
: ${keymap:=$KEYMAP}
|
||||||
: ${extended_keymaps:=$EXTENDED_KEYMAPS}
|
: ${extended_keymaps:=$EXTENDED_KEYMAPS}
|
||||||
: ${windowkeys:=$SET_WINDOWSKEYS}
|
: ${windowkeys:=$SET_WINDOWSKEYS}
|
||||||
: ${fix_euro:=$FIX_EURO}
|
: ${fix_euro:=$FIX_EURO}
|
||||||
: ${dumpkeys_charset:=${DUMPKEYS_CHARSET}}
|
: ${dumpkeys_charset:=${DUMPKEYS_CHARSET}}
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@ start()
|
|||||||
killall5 -15
|
killall5 -15
|
||||||
sleep 1
|
sleep 1
|
||||||
eend 0
|
eend 0
|
||||||
ebegin "Killing remaining processes"
|
ebegin "Killing remaining processes"
|
||||||
killall5 -9
|
killall5 -9
|
||||||
sleep 1
|
sleep 1
|
||||||
eend 0
|
eend 0
|
||||||
|
@ -21,13 +21,13 @@ depend()
|
|||||||
|
|
||||||
start()
|
start()
|
||||||
{
|
{
|
||||||
ebegin "Starting $name"
|
ebegin "Starting $name"
|
||||||
|
|
||||||
if [ -z "$moused_device" ]; then
|
if [ -z "$moused_device" ]; then
|
||||||
local dev=
|
local dev=
|
||||||
for dev in /dev/psm[0-9]* /dev/ums[0-9]*; do
|
for dev in /dev/psm[0-9]* /dev/ums[0-9]*; do
|
||||||
[ -c "$dev" ] || continue
|
[ -c "$dev" ] || continue
|
||||||
[ -e /var/run/moused-"${dev##*/}".pid ] && continue
|
[ -e /var/run/moused-"${dev##*/}".pid ] && continue
|
||||||
moused_device=$dev
|
moused_device=$dev
|
||||||
eindent
|
eindent
|
||||||
einfo "Using mouse on $moused_device"
|
einfo "Using mouse on $moused_device"
|
||||||
@ -37,7 +37,7 @@ start()
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -z "$moused_device" ]; then
|
if [ -z "$moused_device" ]; then
|
||||||
eend 1 "No mouse device found"
|
eend 1 "No mouse device found"
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -49,7 +49,7 @@ start()
|
|||||||
--pidfile "$pidfile" \
|
--pidfile "$pidfile" \
|
||||||
-- $args -p "$moused_device" -I "$pidfile"
|
-- $args -p "$moused_device" -I "$pidfile"
|
||||||
local retval=$?
|
local retval=$?
|
||||||
|
|
||||||
if [ $retval = 0 ]; then
|
if [ $retval = 0 ]; then
|
||||||
local ttyv=
|
local ttyv=
|
||||||
for ttyv in /dev/ttyv*; do
|
for ttyv in /dev/ttyv*; do
|
||||||
@ -57,6 +57,6 @@ start()
|
|||||||
: $((retval+= $?))
|
: $((retval+= $?))
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
eend $retval "Failed to start moused"
|
eend $retval "Failed to start moused"
|
||||||
}
|
}
|
||||||
|
@ -180,7 +180,7 @@ _gen_module_list()
|
|||||||
${update} || return 0
|
${update} || return 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
einfo "Caching network module dependencies"
|
einfo "Caching network module dependencies"
|
||||||
# Run in a subshell to protect the main script
|
# Run in a subshell to protect the main script
|
||||||
(
|
(
|
||||||
after() {
|
after() {
|
||||||
@ -215,7 +215,7 @@ _gen_module_list()
|
|||||||
|
|
||||||
for MODULE in "${MODULESDIR}"/*.sh; do
|
for MODULE in "${MODULESDIR}"/*.sh; do
|
||||||
sh -n "${MODULE}" || continue
|
sh -n "${MODULE}" || continue
|
||||||
. "${MODULE}" || continue
|
. "${MODULE}" || continue
|
||||||
MODULE=${MODULE#${MODULESDIR}/}
|
MODULE=${MODULE#${MODULESDIR}/}
|
||||||
MODULE=${MODULE%.sh}
|
MODULE=${MODULE%.sh}
|
||||||
eval ${MODULE}_depend
|
eval ${MODULE}_depend
|
||||||
@ -343,7 +343,7 @@ _load_modules()
|
|||||||
|
|
||||||
# Wrap our provides
|
# Wrap our provides
|
||||||
local f=
|
local f=
|
||||||
for f in pre_start start post_start; do
|
for f in pre_start start post_start; do
|
||||||
eval "${provides}_${f}() { [ "$(command -v "${mod}_${f}")" = "${mod}_${f}" ] || return 0; ${mod}_${f} \"\$@\"; }"
|
eval "${provides}_${f}() { [ "$(command -v "${mod}_${f}")" = "${mod}_${f}" ] || return 0; ${mod}_${f} \"\$@\"; }"
|
||||||
done
|
done
|
||||||
|
|
||||||
@ -357,7 +357,7 @@ _load_modules()
|
|||||||
*" ${mod} "*)
|
*" ${mod} "*)
|
||||||
eval x=\$module_${mod}_provides
|
eval x=\$module_${mod}_provides
|
||||||
[ -z "${x}" ] && continue
|
[ -z "${x}" ] && continue
|
||||||
for f in pre_start start post_start; do
|
for f in pre_start start post_start; do
|
||||||
eval "${x}_${f}() { [ "$(command -v "${mod}_${f}")" = "${mod}_${f}" ] || return 0; ${mod}_${f} \"\$@\"; }"
|
eval "${x}_${f}() { [ "$(command -v "${mod}_${f}")" = "${mod}_${f}" ] || return 0; ${mod}_${f} \"\$@\"; }"
|
||||||
done
|
done
|
||||||
eval module_${x}_providedby="${mod}"
|
eval module_${x}_providedby="${mod}"
|
||||||
@ -379,7 +379,7 @@ _load_modules()
|
|||||||
MODULES="${MODULES}${MODULES:+ }${mod}"
|
MODULES="${MODULES}${MODULES:+ }${mod}"
|
||||||
done
|
done
|
||||||
else
|
else
|
||||||
for mod in ${LIST}; do
|
for mod in ${LIST}; do
|
||||||
MODULES="${mod}${MODULES:+ }${MODULES}"
|
MODULES="${mod}${MODULES:+ }${MODULES}"
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
@ -395,7 +395,7 @@ _load_config()
|
|||||||
config_index=0
|
config_index=0
|
||||||
local IFS="$__IFS"
|
local IFS="$__IFS"
|
||||||
set -- ${config}
|
set -- ${config}
|
||||||
|
|
||||||
# We should support a space separated array for cidr configs
|
# We should support a space separated array for cidr configs
|
||||||
if [ $# = 1 ]; then
|
if [ $# = 1 ]; then
|
||||||
unset IFS
|
unset IFS
|
||||||
@ -415,7 +415,7 @@ _load_config()
|
|||||||
config_0="127.0.0.1/8"
|
config_0="127.0.0.1/8"
|
||||||
config_index=1
|
config_index=1
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
if [ -z "$1" ]; then
|
if [ -z "$1" ]; then
|
||||||
ewarn "No configuration specified; defaulting to DHCP"
|
ewarn "No configuration specified; defaulting to DHCP"
|
||||||
config_0="dhcp"
|
config_0="dhcp"
|
||||||
@ -500,7 +500,7 @@ start()
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
_up 2>/dev/null
|
_up 2>/dev/null
|
||||||
|
|
||||||
for module in ${MODULES}; do
|
for module in ${MODULES}; do
|
||||||
if [ "$(command -v "${module}_pre_start")" = "${module}_pre_start" ]; then
|
if [ "$(command -v "${module}_pre_start")" = "${module}_pre_start" ]; then
|
||||||
${module}_pre_start || exit $?
|
${module}_pre_start || exit $?
|
||||||
@ -527,7 +527,7 @@ start()
|
|||||||
_load_config
|
_load_config
|
||||||
config_index=0
|
config_index=0
|
||||||
|
|
||||||
eval our_metric=\$metric_${IFVAR}
|
eval our_metric=\$metric_${IFVAR}
|
||||||
if [ -n "${our_metric}" ]; then
|
if [ -n "${our_metric}" ]; then
|
||||||
metric=${our_metric}
|
metric=${our_metric}
|
||||||
elif [ "${IFACE}" != "lo" -a "${IFACE}" != "lo0" ]; then
|
elif [ "${IFACE}" != "lo" -a "${IFACE}" != "lo0" ]; then
|
||||||
@ -536,7 +536,7 @@ start()
|
|||||||
|
|
||||||
while true; do
|
while true; do
|
||||||
eval config=\$config_${config_index}
|
eval config=\$config_${config_index}
|
||||||
[ -z "${config}" ] && break
|
[ -z "${config}" ] && break
|
||||||
|
|
||||||
set -- ${config}
|
set -- ${config}
|
||||||
ebegin "$1"
|
ebegin "$1"
|
||||||
@ -638,7 +638,7 @@ ${routes}"
|
|||||||
if [ "$(command -v postup)" = "postup" ]; then
|
if [ "$(command -v postup)" = "postup" ]; then
|
||||||
ebegin "Running postup"
|
ebegin "Running postup"
|
||||||
eindent
|
eindent
|
||||||
postup
|
postup
|
||||||
eoutdent
|
eoutdent
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -39,7 +39,7 @@ depend()
|
|||||||
}
|
}
|
||||||
|
|
||||||
start()
|
start()
|
||||||
{
|
{
|
||||||
local myneed= myuse= pmap="portmap" nfsmounts=
|
local myneed= myuse= pmap="portmap" nfsmounts=
|
||||||
[ -x @SYSCONFDIR@/init.d/rpcbind ] && pmap="rpcbind"
|
[ -x @SYSCONFDIR@/init.d/rpcbind ] && pmap="rpcbind"
|
||||||
|
|
||||||
|
@ -222,7 +222,7 @@ start()
|
|||||||
einfo "Starting network"
|
einfo "Starting network"
|
||||||
routeflush
|
routeflush
|
||||||
if [ "$RC_UNAME" = "Linux" ]; then
|
if [ "$RC_UNAME" = "Linux" ]; then
|
||||||
ifconfig lo 127.0.0.1 netmask 255.0.0.0 || cr=1
|
ifconfig lo 127.0.0.1 netmask 255.0.0.0 || cr=1
|
||||||
route add -net 127.0.0.0 netmask 255.0.0.0 \
|
route add -net 127.0.0.0 netmask 255.0.0.0 \
|
||||||
gw 127.0.0.1 reject 2>/dev/null
|
gw 127.0.0.1 reject 2>/dev/null
|
||||||
else
|
else
|
||||||
@ -287,7 +287,7 @@ start()
|
|||||||
[ $r != 0 ]
|
[ $r != 0 ]
|
||||||
veend $?
|
veend $?
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -n "$defaultroute" ]; then
|
if [ -n "$defaultroute" ]; then
|
||||||
ebegin "Setting default route $defaultroute"
|
ebegin "Setting default route $defaultroute"
|
||||||
route add default $defaultroute
|
route add default $defaultroute
|
||||||
|
@ -44,7 +44,7 @@ reload()
|
|||||||
{
|
{
|
||||||
ebegin "Reloading $name rules."
|
ebegin "Reloading $name rules."
|
||||||
pfctl -q -n -f "$pf_conf" && \
|
pfctl -q -n -f "$pf_conf" && \
|
||||||
{
|
{
|
||||||
# Flush everything but existing state entries that way when
|
# Flush everything but existing state entries that way when
|
||||||
# rules are read in, it doesn't break established connections.
|
# rules are read in, it doesn't break established connections.
|
||||||
pfctl -q -Fnat -Fqueue -Frules -FSources -Finfo -FTables -Fosfp
|
pfctl -q -Fnat -Fqueue -Frules -FSources -Finfo -FTables -Fosfp
|
||||||
|
@ -13,11 +13,11 @@ start()
|
|||||||
ebegin "Activating block swap devices"
|
ebegin "Activating block swap devices"
|
||||||
swapctl -A -t blk >/dev/null
|
swapctl -A -t blk >/dev/null
|
||||||
eend 0 # If swapon has nothing todo it errors, so always return 0
|
eend 0 # If swapon has nothing todo it errors, so always return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
stop()
|
stop()
|
||||||
{
|
{
|
||||||
ebegin "Deactivating block swap devices"
|
ebegin "Deactivating block swap devices"
|
||||||
swapctl -U -t blk >/dev/null
|
swapctl -U -t blk >/dev/null
|
||||||
eend 0
|
eend 0
|
||||||
}
|
}
|
||||||
|
@ -16,7 +16,7 @@ start()
|
|||||||
*) swapon -a >/dev/null;;
|
*) swapon -a >/dev/null;;
|
||||||
esac
|
esac
|
||||||
eend 0 # If swapon has nothing todo it errors, so always return 0
|
eend 0 # If swapon has nothing todo it errors, so always return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
stop()
|
stop()
|
||||||
{
|
{
|
||||||
@ -31,5 +31,5 @@ stop()
|
|||||||
NetBSD|OpenBSD) swapctl -U -t noblk >/dev/null;;
|
NetBSD|OpenBSD) swapctl -U -t noblk >/dev/null;;
|
||||||
*) swapoff -a >/dev/null;;
|
*) swapoff -a >/dev/null;;
|
||||||
esac
|
esac
|
||||||
eend 0
|
eend 0
|
||||||
}
|
}
|
||||||
|
@ -15,13 +15,13 @@ start() {
|
|||||||
done
|
done
|
||||||
eend $?
|
eend $?
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -n "$keymap" ]; then
|
if [ -n "$keymap" ]; then
|
||||||
ebegin "Setting keymap to $keymap"
|
ebegin "Setting keymap to $keymap"
|
||||||
kbdcontrol -l $keymap </dev/console
|
kbdcontrol -l $keymap </dev/console
|
||||||
eend $?
|
eend $?
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -n "$keyrate" ]; then
|
if [ -n "$keyrate" ]; then
|
||||||
ebegin "Setting keyrate to $keyrate"
|
ebegin "Setting keyrate to $keyrate"
|
||||||
kbdcontrol -r $keyrate </dev/console
|
kbdcontrol -r $keyrate </dev/console
|
||||||
@ -40,7 +40,7 @@ start() {
|
|||||||
done
|
done
|
||||||
eoutdent
|
eoutdent
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -n "$cursor" ]; then
|
if [ -n "$cursor" ]; then
|
||||||
ebegin "Setting cursor"
|
ebegin "Setting cursor"
|
||||||
vidcontrol -c $cursor
|
vidcontrol -c $cursor
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
# Copyright (c) 2008 Roy Marples <roy@marples.name>
|
# Copyright (c) 2008 Roy Marples <roy@marples.name>
|
||||||
# All rights reserved. Released under the 2-clause BSD license.
|
# All rights reserved. Released under the 2-clause BSD license.
|
||||||
|
|
||||||
depend()
|
depend()
|
||||||
{
|
{
|
||||||
after fsck
|
after fsck
|
||||||
keyword -prefix
|
keyword -prefix
|
||||||
@ -13,7 +13,7 @@ start()
|
|||||||
ebegin "Setting tty flags"
|
ebegin "Setting tty flags"
|
||||||
ttyflags -a
|
ttyflags -a
|
||||||
eend $? || return $?
|
eend $? || return $?
|
||||||
|
|
||||||
if [ -c /dev/ttyp0 ]; then
|
if [ -c /dev/ttyp0 ]; then
|
||||||
chmod 666 /dev/tty[p-uw-zP-T][0-9a-zA-Z]
|
chmod 666 /dev/tty[p-uw-zP-T][0-9a-zA-Z]
|
||||||
fi
|
fi
|
||||||
|
@ -27,10 +27,10 @@ start()
|
|||||||
font)
|
font)
|
||||||
cmd=$wsfld
|
cmd=$wsfld
|
||||||
[ "$arg2" != "-" ] && cmd="$cmd -w $arg2"
|
[ "$arg2" != "-" ] && cmd="$cmd -w $arg2"
|
||||||
[ "$arg3" != "-" ] && cmd="$cmd -h $arg3"
|
[ "$arg3" != "-" ] && cmd="$cmd -h $arg3"
|
||||||
[ "$arg4" != "-" ] && cmd="$cmd -e $arg4"
|
[ "$arg4" != "-" ] && cmd="$cmd -e $arg4"
|
||||||
cmd="$cmd -N $arg1 $arg5"
|
cmd="$cmd -N $arg1 $arg5"
|
||||||
eval "$cmd"
|
eval "$cmd"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
screen)
|
screen)
|
||||||
|
@ -21,7 +21,7 @@ apipa_start()
|
|||||||
local iface="$1" i1= i2= addr= i=0
|
local iface="$1" i1= i2= addr= i=0
|
||||||
|
|
||||||
_exists true || return 1
|
_exists true || return 1
|
||||||
|
|
||||||
einfo "Searching for free addresses in 169.254.0.0/16"
|
einfo "Searching for free addresses in 169.254.0.0/16"
|
||||||
eindent
|
eindent
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@ arping_address()
|
|||||||
esac
|
esac
|
||||||
|
|
||||||
# We need to bring the interface up to test
|
# We need to bring the interface up to test
|
||||||
_exists "${iface}" || return 1
|
_exists "${iface}" || return 1
|
||||||
_up "${iface}"
|
_up "${iface}"
|
||||||
|
|
||||||
eval w=\$arping_wait_${IFVAR}
|
eval w=\$arping_wait_${IFVAR}
|
||||||
@ -43,7 +43,7 @@ arping_address()
|
|||||||
sed -n -e 'y/abcdef/ABCDEF/' -e 's/.*\[\([^]]*\)\].*/\1/p')"
|
sed -n -e 'y/abcdef/ABCDEF/' -e 's/.*\[\([^]]*\)\].*/\1/p')"
|
||||||
fi
|
fi
|
||||||
[ -z "${foundmac}" ] && return 1
|
[ -z "${foundmac}" ] && return 1
|
||||||
|
|
||||||
if [ -n "${mac}" ]; then
|
if [ -n "${mac}" ]; then
|
||||||
if [ "${mac}" != "${foundmac}" ]; then
|
if [ "${mac}" != "${foundmac}" ]; then
|
||||||
vewarn "Found ${ip} but MAC ${foundmac} does not match"
|
vewarn "Found ${ip} but MAC ${foundmac} does not match"
|
||||||
@ -74,7 +74,7 @@ arping_start()
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
eindent
|
eindent
|
||||||
|
|
||||||
for x in ${gateways}; do
|
for x in ${gateways}; do
|
||||||
local IFS=,
|
local IFS=,
|
||||||
set -- ${x}
|
set -- ${x}
|
||||||
@ -119,7 +119,7 @@ arping_start()
|
|||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
unset IFS
|
unset IFS
|
||||||
|
|
||||||
_load_config
|
_load_config
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
|
@ -115,7 +115,7 @@ bonding_pre_start()
|
|||||||
|
|
||||||
bonding_stop()
|
bonding_stop()
|
||||||
{
|
{
|
||||||
_is_bond || return 0
|
_is_bond || return 0
|
||||||
|
|
||||||
local slaves= s=
|
local slaves= s=
|
||||||
slaves=$( \
|
slaves=$( \
|
||||||
|
@ -17,7 +17,7 @@ br2684ctl_depend()
|
|||||||
}
|
}
|
||||||
|
|
||||||
_config_vars="$_config_vars bridge bridge_add brctl"
|
_config_vars="$_config_vars bridge bridge_add brctl"
|
||||||
|
|
||||||
br2684ctl_pre_start()
|
br2684ctl_pre_start()
|
||||||
{
|
{
|
||||||
local opts=
|
local opts=
|
||||||
@ -40,7 +40,7 @@ br2684ctl_pre_start()
|
|||||||
return 1
|
return 1
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
einfo "Starting RFC 2684 Bridge control on ${IFACE}"
|
einfo "Starting RFC 2684 Bridge control on ${IFACE}"
|
||||||
start-stop-daemon --start --exec $(_br2684ctl) --background \
|
start-stop-daemon --start --exec $(_br2684ctl) --background \
|
||||||
--make-pidfile --pidfile "/var/run/br2684ctl-${IFACE}.pid" \
|
--make-pidfile --pidfile "/var/run/br2684ctl-${IFACE}.pid" \
|
||||||
@ -52,7 +52,7 @@ br2684ctl_post_stop()
|
|||||||
{
|
{
|
||||||
local pidfile="/var/run/br2684ctl-${IFACE}.pid"
|
local pidfile="/var/run/br2684ctl-${IFACE}.pid"
|
||||||
[ -e "${pidfile}" ] || return 0
|
[ -e "${pidfile}" ] || return 0
|
||||||
|
|
||||||
einfo "Stopping RFC 2684 Bridge control on ${IFACE}"
|
einfo "Stopping RFC 2684 Bridge control on ${IFACE}"
|
||||||
start-stop-daemon --stop --quiet --pidfile "${pidfile}"
|
start-stop-daemon --stop --quiet --pidfile "${pidfile}"
|
||||||
eend $?
|
eend $?
|
||||||
|
@ -38,13 +38,13 @@ bridge_pre_start()
|
|||||||
local opts="$(_get_array "brctl_${IFVAR}")"
|
local opts="$(_get_array "brctl_${IFVAR}")"
|
||||||
# brif is used for dynamic add
|
# brif is used for dynamic add
|
||||||
eval brif=\$bridge_add_${IFVAR}
|
eval brif=\$bridge_add_${IFVAR}
|
||||||
|
|
||||||
# we need a way to if the bridge exists in a variable name, not just the
|
# we need a way to if the bridge exists in a variable name, not just the
|
||||||
# contents of a variable. Eg if somebody has only bridge_add_eth0='br0',
|
# contents of a variable. Eg if somebody has only bridge_add_eth0='br0',
|
||||||
# with no other lines mentioning br0.
|
# with no other lines mentioning br0.
|
||||||
eval bridge_unset=\${bridge_${IFVAR}-y\}
|
eval bridge_unset=\${bridge_${IFVAR}-y\}
|
||||||
eval brctl_unset=\${brctl_${IFVAR}-y\}
|
eval brctl_unset=\${brctl_${IFVAR}-y\}
|
||||||
|
|
||||||
if [ -z "${brif}" -a "${brctl_unset}" == 'y' ]; then
|
if [ -z "${brif}" -a "${brctl_unset}" == 'y' ]; then
|
||||||
if [ -z "${ports}" -a "${bridge_unset}" == "y" ]; then
|
if [ -z "${ports}" -a "${bridge_unset}" == "y" ]; then
|
||||||
#eerror "Misconfigured static bridge detected (see net.example)"
|
#eerror "Misconfigured static bridge detected (see net.example)"
|
||||||
@ -186,6 +186,6 @@ bridge_post_stop()
|
|||||||
brctl delbr "${iface}"
|
brctl delbr "${iface}"
|
||||||
eend $?
|
eend $?
|
||||||
fi
|
fi
|
||||||
|
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
@ -5,7 +5,7 @@ _config_vars="$_config_vars ccwgroup"
|
|||||||
|
|
||||||
ccwgroup_depend()
|
ccwgroup_depend()
|
||||||
{
|
{
|
||||||
before interface
|
before interface
|
||||||
}
|
}
|
||||||
|
|
||||||
ccwgroup_pre_start()
|
ccwgroup_pre_start()
|
||||||
@ -42,7 +42,7 @@ ccwgroup_pre_stop()
|
|||||||
{
|
{
|
||||||
# Erase any existing ccwgroup to be safe
|
# Erase any existing ccwgroup to be safe
|
||||||
service_set_value ccwgroup_device ""
|
service_set_value ccwgroup_device ""
|
||||||
|
|
||||||
[ ! -L /sys/class/net/"${FACE}"/driver ] && return 0
|
[ ! -L /sys/class/net/"${FACE}"/driver ] && return 0
|
||||||
local driver="$(readlink /sys/class/net/"${IFACE}"/driver)"
|
local driver="$(readlink /sys/class/net/"${IFACE}"/driver)"
|
||||||
case "${diver}" in
|
case "${diver}" in
|
||||||
@ -59,7 +59,7 @@ ccwgroup_post_stop()
|
|||||||
{
|
{
|
||||||
local device="$(service_get_value ccwgroup_device)"
|
local device="$(service_get_value ccwgroup_device)"
|
||||||
[ -z "${device}" ] && return 0
|
[ -z "${device}" ] && return 0
|
||||||
|
|
||||||
einfo "Disabling ccwgroup on ${iface}"
|
einfo "Disabling ccwgroup on ${iface}"
|
||||||
echo "0" >/sys/devices/qeth/"${device}"/online
|
echo "0" >/sys/devices/qeth/"${device}"/online
|
||||||
echo "1" >/sys/devices/qeth/"${device}"/ungroup
|
echo "1" >/sys/devices/qeth/"${device}"/ungroup
|
||||||
|
@ -97,7 +97,7 @@ clip_pre_start()
|
|||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
local started_here=
|
local started_here=
|
||||||
if ! are_atmclip_svcs_running; then
|
if ! are_atmclip_svcs_running; then
|
||||||
atmclip_svcs_start || return 1
|
atmclip_svcs_start || return 1
|
||||||
|
@ -139,7 +139,7 @@ _add_address()
|
|||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
case "$1" in
|
case "$1" in
|
||||||
*:*) ifconfig "${IFACE}" inet6 add "$@"; return $?;;
|
*:*) ifconfig "${IFACE}" inet6 add "$@"; return $?;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
@ -225,7 +225,7 @@ _delete_addresses()
|
|||||||
while true; do
|
while true; do
|
||||||
local addr=$(_get_inet_address)
|
local addr=$(_get_inet_address)
|
||||||
[ -z "${addr}" ] && break
|
[ -z "${addr}" ] && break
|
||||||
|
|
||||||
if [ "${addr}" = "127.0.0.1/8" ]; then
|
if [ "${addr}" = "127.0.0.1/8" ]; then
|
||||||
# Don't delete the loopback address
|
# Don't delete the loopback address
|
||||||
[ "${IFACE}" = "lo" -o "${IFACE}" = "lo0" ] && break
|
[ "${IFACE}" = "lo" -o "${IFACE}" = "lo0" ] && break
|
||||||
@ -246,7 +246,7 @@ _delete_addresses()
|
|||||||
einfo "${addr}"
|
einfo "${addr}"
|
||||||
ifconfig "${IFACE}" inet6 del "${addr}"
|
ifconfig "${IFACE}" inet6 del "${addr}"
|
||||||
done
|
done
|
||||||
|
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -57,7 +57,7 @@ ifplugd_pre_start()
|
|||||||
ewarn "WARNING: infinite timeout set for ${IFACE} to come up"
|
ewarn "WARNING: infinite timeout set for ${IFACE} to come up"
|
||||||
elif [ ${timeout} -lt 0 ]; then
|
elif [ ${timeout} -lt 0 ]; then
|
||||||
einfo "Backgrounding ..."
|
einfo "Backgrounding ..."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
veinfo "Waiting for ${IFACE} to be marked as started"
|
veinfo "Waiting for ${IFACE} to be marked as started"
|
||||||
@ -84,7 +84,7 @@ ifplugd_stop()
|
|||||||
|
|
||||||
local pidfile="/var/run/ifplugd.${IFACE}.pid"
|
local pidfile="/var/run/ifplugd.${IFACE}.pid"
|
||||||
[ ! -e "${pidfile}" ] && return 0
|
[ ! -e "${pidfile}" ] && return 0
|
||||||
|
|
||||||
ebegin "Stopping ifplugd on ${IFACE}"
|
ebegin "Stopping ifplugd on ${IFACE}"
|
||||||
start-stop-daemon --stop --quiet --exec /usr/sbin/ifplugd \
|
start-stop-daemon --stop --quiet --exec /usr/sbin/ifplugd \
|
||||||
--pidfile "${pidfile}" --signal QUIT
|
--pidfile "${pidfile}" --signal QUIT
|
||||||
|
@ -50,7 +50,7 @@ ifwatchd_stop()
|
|||||||
-- -c "${RC_LIBEXECDIR}/sh/ifwatchd-carrier.sh" \
|
-- -c "${RC_LIBEXECDIR}/sh/ifwatchd-carrier.sh" \
|
||||||
-n "${RC_LIBEXECDIR}/sh/ifwatchd-nocarrier.sh" "${IFACE}" \
|
-n "${RC_LIBEXECDIR}/sh/ifwatchd-nocarrier.sh" "${IFACE}" \
|
||||||
|| return 0
|
|| return 0
|
||||||
|
|
||||||
ebegin "Stopping ifwatchd on" "${IFACE}"
|
ebegin "Stopping ifwatchd on" "${IFACE}"
|
||||||
start-stop-daemon --stop --exec /usr/sbin/ifwatchd \
|
start-stop-daemon --stop --exec /usr/sbin/ifwatchd \
|
||||||
-- -c "${RC_LIBEXECDIR}/sh/ifwatchd-carrier.sh" \
|
-- -c "${RC_LIBEXECDIR}/sh/ifwatchd-carrier.sh" \
|
||||||
|
@ -56,7 +56,7 @@ ip6to4_start()
|
|||||||
[ ${i} -lt 32 ] && continue
|
[ ${i} -lt 32 ] && continue
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
veinfo "IPv4 address on ${host}: ${ip}/${subnet}"
|
veinfo "IPv4 address on ${host}: ${ip}/${subnet}"
|
||||||
local ipa= ip6= IFS="${IFS}."
|
local ipa= ip6= IFS="${IFS}."
|
||||||
for i in ${ip}; do
|
for i in ${ip}; do
|
||||||
@ -87,7 +87,7 @@ ip6to4_start()
|
|||||||
eend $? || return 1
|
eend $? || return 1
|
||||||
_up
|
_up
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Now apply our config
|
# Now apply our config
|
||||||
eval config_${config_index}=\'"${new}"\'
|
eval config_${config_index}=\'"${new}"\'
|
||||||
config_index=$((${config_index} - 1))
|
config_index=$((${config_index} - 1))
|
||||||
|
@ -117,14 +117,14 @@ _add_address()
|
|||||||
shift; shift; shift
|
shift; shift; shift
|
||||||
set -- "${one}/$(_netmask2cidr "${three}")" "$@"
|
set -- "${one}/$(_netmask2cidr "${three}")" "$@"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# tunnel keyword is 'peer' in iproute2, but 'pointopoint' in ifconfig.
|
# tunnel keyword is 'peer' in iproute2, but 'pointopoint' in ifconfig.
|
||||||
if [ "$2" = "pointopoint" ]; then
|
if [ "$2" = "pointopoint" ]; then
|
||||||
local one="$1"
|
local one="$1"
|
||||||
shift; shift
|
shift; shift
|
||||||
set -- "${one}" "peer" "$@"
|
set -- "${one}" "peer" "$@"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Always scope lo addresses as host unless specified otherwise
|
# Always scope lo addresses as host unless specified otherwise
|
||||||
if [ "${IFACE}" = "lo" ]; then
|
if [ "${IFACE}" = "lo" ]; then
|
||||||
set -- "$@" "scope" "host"
|
set -- "$@" "scope" "host"
|
||||||
@ -162,7 +162,7 @@ _add_route()
|
|||||||
set -- "${one}" "${two}" via "$@"
|
set -- "${one}" "${two}" via "$@"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
local cmd= have_metric=false
|
local cmd= have_metric=false
|
||||||
while [ -n "$1" ]; do
|
while [ -n "$1" ]; do
|
||||||
case "$1" in
|
case "$1" in
|
||||||
metric) cmd="${cmd} $1"; have_metric=true;;
|
metric) cmd="${cmd} $1"; have_metric=true;;
|
||||||
|
@ -477,7 +477,7 @@ iwconfig_defaults()
|
|||||||
#ifconfig "${iface}" txpower 100 2>/dev/null
|
#ifconfig "${iface}" txpower 100 2>/dev/null
|
||||||
ifconfig "${IFACE}" bssid -
|
ifconfig "${IFACE}" bssid -
|
||||||
ifconfig "${IFACE}" ssid -
|
ifconfig "${IFACE}" ssid -
|
||||||
ifconfig "${IFACE}" wepkey 1:- wepkey 2:- wepkey 3:- wepkey 4:-
|
ifconfig "${IFACE}" wepkey 1:- wepkey 2:- wepkey 3:- wepkey 4:-
|
||||||
ifconfig "${IFACE}" authmode open
|
ifconfig "${IFACE}" authmode open
|
||||||
ifconfig "${IFACE}" -mediaopt adhoc
|
ifconfig "${IFACE}" -mediaopt adhoc
|
||||||
ifconfig "${IFACE}" -mediaopt hostap
|
ifconfig "${IFACE}" -mediaopt hostap
|
||||||
@ -563,8 +563,8 @@ iwconfig_pre_start()
|
|||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
iwconfig_defaults
|
iwconfig_defaults
|
||||||
iwconfig_user_config
|
iwconfig_user_config
|
||||||
|
|
||||||
# Set the base metric to be 2000
|
# Set the base metric to be 2000
|
||||||
metric=2000
|
metric=2000
|
||||||
|
@ -47,7 +47,7 @@ _get_ssid()
|
|||||||
|
|
||||||
_get_ap_mac_address()
|
_get_ap_mac_address()
|
||||||
{
|
{
|
||||||
local mac="$(iwgetid --raw --ap "${IFACE}")"
|
local mac="$(iwgetid --raw --ap "${IFACE}")"
|
||||||
case "${mac}" in
|
case "${mac}" in
|
||||||
"00:00:00:00:00:00") return 1;;
|
"00:00:00:00:00:00") return 1;;
|
||||||
"44:44:44:44:44:44") return 1;;
|
"44:44:44:44:44:44") return 1;;
|
||||||
@ -163,7 +163,7 @@ iwconfig_setup_specific()
|
|||||||
local key=$(iwconfig_get_wep_key)
|
local key=$(iwconfig_get_wep_key)
|
||||||
|
|
||||||
iwconfig_set_mode "${mode}"
|
iwconfig_set_mode "${mode}"
|
||||||
|
|
||||||
# Now set the key
|
# Now set the key
|
||||||
if ! eval iwconfig "${IFACE}" key "${key}"; then
|
if ! eval iwconfig "${IFACE}" key "${key}"; then
|
||||||
if [ "${key}" != "off" ]; then
|
if [ "${key}" != "off" ]; then
|
||||||
@ -185,10 +185,10 @@ iwconfig_setup_specific()
|
|||||||
ewarn "${IFACE} does not support setting the channel to \"${channel:-3}\""
|
ewarn "${IFACE} does not support setting the channel to \"${channel:-3}\""
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Finally apply the user Config
|
# Finally apply the user Config
|
||||||
iwconfig_user_config
|
iwconfig_user_config
|
||||||
|
|
||||||
iwconfig_report
|
iwconfig_report
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
@ -226,7 +226,7 @@ iwconfig_wait_for_association()
|
|||||||
/proc/net/wireless)" != "0" ] && return 0
|
/proc/net/wireless)" != "0" ] && return 0
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
sleep 1
|
sleep 1
|
||||||
[ ${timeout} -eq 0 ] && continue
|
[ ${timeout} -eq 0 ] && continue
|
||||||
i=$((${i} + 1))
|
i=$((${i} + 1))
|
||||||
@ -281,7 +281,7 @@ iwconfig_associate()
|
|||||||
iwconfig "${IFACE}" freq "${freq}"
|
iwconfig "${IFACE}" freq "${freq}"
|
||||||
fi
|
fi
|
||||||
[ -n "${mac}" ] && iwconfig "${IFACE}" ap "${mac}"
|
[ -n "${mac}" ] && iwconfig "${IFACE}" ap "${mac}"
|
||||||
|
|
||||||
# Finally apply the user Config
|
# Finally apply the user Config
|
||||||
iwconfig_user_config
|
iwconfig_user_config
|
||||||
|
|
||||||
@ -377,10 +377,10 @@ iwconfig_scan()
|
|||||||
for line; do
|
for line; do
|
||||||
case "${line}" in
|
case "${line}" in
|
||||||
*Address:*)
|
*Address:*)
|
||||||
APS=$((${APS} + 1))
|
APS=$((${APS} + 1))
|
||||||
eval MAC_${APS}="\""$(echo "${line#*: }" | tr '[:lower:]' '[:upper:]')"\""
|
eval MAC_${APS}="\""$(echo "${line#*: }" | tr '[:lower:]' '[:upper:]')"\""
|
||||||
eval QUALITY_${APS}=0
|
eval QUALITY_${APS}=0
|
||||||
;;
|
;;
|
||||||
*ESSID:*)
|
*ESSID:*)
|
||||||
x=${line#*\"}
|
x=${line#*\"}
|
||||||
x=${x%*\"}
|
x=${x%*\"}
|
||||||
@ -455,7 +455,7 @@ iwconfig_scan()
|
|||||||
eval a=\$QUALITY_${i}
|
eval a=\$QUALITY_${i}
|
||||||
eval b=\$QUALITY_${k}
|
eval b=\$QUALITY_${k}
|
||||||
local u=${k}
|
local u=${k}
|
||||||
# We need to split this into two tests, otherwise bash errors
|
# We need to split this into two tests, otherwise bash errors
|
||||||
[ -n "${a}" -a -n "${b}" ] && [ "${a}" -lt "${b}" ] && u=${i}
|
[ -n "${a}" -a -n "${b}" ] && [ "${a}" -lt "${b}" ] && u=${i}
|
||||||
unset MAC_${u} SSID_${u} MODE_${u} CHAN_${u} QUALITY_${u} ENC_${u}
|
unset MAC_${u} SSID_${u} MODE_${u} CHAN_${u} QUALITY_${u} ENC_${u}
|
||||||
fi
|
fi
|
||||||
@ -581,7 +581,7 @@ iwconfig_connect_not_preferred()
|
|||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
if ! ${pref}; then
|
if ! ${pref}; then
|
||||||
SSID=${e}
|
SSID=${e}
|
||||||
eval mode=\$MODE_${i}
|
eval mode=\$MODE_${i}
|
||||||
@ -711,10 +711,10 @@ iwconfig_pre_start()
|
|||||||
# wait if our scan returns nothing
|
# wait if our scan returns nothing
|
||||||
LC_ALL=C iwconfig "${IFACE}" | sed -e '1d' | grep -q "Tx-Power=off"
|
LC_ALL=C iwconfig "${IFACE}" | sed -e '1d' | grep -q "Tx-Power=off"
|
||||||
local txpowerwasoff=$?
|
local txpowerwasoff=$?
|
||||||
|
|
||||||
iwconfig_defaults
|
iwconfig_defaults
|
||||||
iwconfig_user_config
|
iwconfig_user_config
|
||||||
|
|
||||||
# Set the base metric to be 2000
|
# Set the base metric to be 2000
|
||||||
metric=2000
|
metric=2000
|
||||||
|
|
||||||
|
@ -24,7 +24,7 @@ macchanger_pre_start()
|
|||||||
|
|
||||||
# The interface needs to be up for macchanger to work most of the time
|
# The interface needs to be up for macchanger to work most of the time
|
||||||
_down
|
_down
|
||||||
|
|
||||||
mac=$(echo "${mac}" | tr '[:upper:]' '[:lower:]')
|
mac=$(echo "${mac}" | tr '[:upper:]' '[:lower:]')
|
||||||
local hex="[0-9a-f][0-9a-f]"
|
local hex="[0-9a-f][0-9a-f]"
|
||||||
case "${mac}" in
|
case "${mac}" in
|
||||||
|
@ -59,7 +59,7 @@ netplugd_pre_start()
|
|||||||
ewarn "WARNING: infinite timeout set for ${IFACE} to come up"
|
ewarn "WARNING: infinite timeout set for ${IFACE} to come up"
|
||||||
elif [ ${timeout} -lt 0 ]; then
|
elif [ ${timeout} -lt 0 ]; then
|
||||||
einfo "Backgrounding ..."
|
einfo "Backgrounding ..."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
veinfo "Waiting for ${IFACE} to be marked as started"
|
veinfo "Waiting for ${IFACE} to be marked as started"
|
||||||
@ -86,7 +86,7 @@ netplugd_stop()
|
|||||||
|
|
||||||
local pidfile="/var/run/netplugd-${IFACE}.pid"
|
local pidfile="/var/run/netplugd-${IFACE}.pid"
|
||||||
[ ! -e "${pidfile}" ] && return 0
|
[ ! -e "${pidfile}" ] && return 0
|
||||||
|
|
||||||
ebegin "Stopping netplug on" "${IFACE}"
|
ebegin "Stopping netplug on" "${IFACE}"
|
||||||
start-stop-daemon --stop --quiet --exec /sbin/netplugd \
|
start-stop-daemon --stop --quiet --exec /sbin/netplugd \
|
||||||
--pidfile "${pidfile}"
|
--pidfile "${pidfile}"
|
||||||
|
@ -31,7 +31,7 @@ pppd_pre_start()
|
|||||||
if yesno ${IN_BACKGROUND}; then
|
if yesno ${IN_BACKGROUND}; then
|
||||||
local config=
|
local config=
|
||||||
eval config=\$config_${IFVAR}
|
eval config=\$config_${IFVAR}
|
||||||
# If no config for ppp then don't default to DHCP
|
# If no config for ppp then don't default to DHCP
|
||||||
if [ -z "${config}" ]; then
|
if [ -z "${config}" ]; then
|
||||||
eval config_${IFVAR}=null
|
eval config_${IFVAR}=null
|
||||||
fi
|
fi
|
||||||
@ -39,7 +39,7 @@ pppd_pre_start()
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
local link= i= unit="${IFACE#ppp}" opts=
|
local link= i= unit="${IFACE#ppp}" opts=
|
||||||
|
|
||||||
# PPP requires a link to communicate over - normally a serial port
|
# PPP requires a link to communicate over - normally a serial port
|
||||||
# PPPoE communicates over Ethernet
|
# PPPoE communicates over Ethernet
|
||||||
# PPPoA communicates over ATM
|
# PPPoA communicates over ATM
|
||||||
@ -92,7 +92,7 @@ pppd_pre_start()
|
|||||||
&& [ -n "${password}" -o -z "${passwordset}" ]; then
|
&& [ -n "${password}" -o -z "${passwordset}" ]; then
|
||||||
opts="plugin passwordfd.so ${opts} passwordfd 0"
|
opts="plugin passwordfd.so ${opts} passwordfd 0"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if ! ${hasdefaultmetric}; then
|
if ! ${hasdefaultmetric}; then
|
||||||
local m=
|
local m=
|
||||||
eval m=\$metric_${IFVAR}
|
eval m=\$metric_${IFVAR}
|
||||||
@ -122,7 +122,7 @@ pppd_pre_start()
|
|||||||
|
|
||||||
# Set unit
|
# Set unit
|
||||||
opts="unit ${unit} ${opts}"
|
opts="unit ${unit} ${opts}"
|
||||||
|
|
||||||
# Setup connect script
|
# Setup connect script
|
||||||
local chatprog="/usr/sbin/chat -e -E -v" phone=
|
local chatprog="/usr/sbin/chat -e -E -v" phone=
|
||||||
eval phone=\$phone_number_${IFVAR}
|
eval phone=\$phone_number_${IFVAR}
|
||||||
|
@ -35,7 +35,7 @@ pump_start()
|
|||||||
|
|
||||||
ebegin "Running pump"
|
ebegin "Running pump"
|
||||||
eval pump "${args}"
|
eval pump "${args}"
|
||||||
eend $? || return 1
|
eend $? || return 1
|
||||||
|
|
||||||
_show_address
|
_show_address
|
||||||
return 0
|
return 0
|
||||||
@ -48,7 +48,7 @@ pump_stop()
|
|||||||
start-stop-daemon --quiet --test --stop --exec /sbin/pump || return 0
|
start-stop-daemon --quiet --test --stop --exec /sbin/pump || return 0
|
||||||
|
|
||||||
# Check that pump is running on the interface
|
# Check that pump is running on the interface
|
||||||
if ! pump --status --interface "${IFACE}" >/dev/null 2>&1; then
|
if ! pump --status --interface "${IFACE}" >/dev/null 2>&1; then
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -80,10 +80,10 @@ _system_nis()
|
|||||||
|
|
||||||
eval servers=\$nis_servers_${IFVAR}
|
eval servers=\$nis_servers_${IFVAR}
|
||||||
[ -z "${servers}" ] && servers=${nis_servers}
|
[ -z "${servers}" ] && servers=${nis_servers}
|
||||||
|
|
||||||
eval domain=\$nis_domain_${IFVAR}
|
eval domain=\$nis_domain_${IFVAR}
|
||||||
[ -z "${domain}" ] && domain=${nis_domain}
|
[ -z "${domain}" ] && domain=${nis_domain}
|
||||||
|
|
||||||
[ -z "${servers}" -a -z "${domain}" ] && return 0
|
[ -z "${servers}" -a -z "${domain}" ] && return 0
|
||||||
|
|
||||||
buffer="# Generated by net-scripts for interface ${iface}\n"
|
buffer="# Generated by net-scripts for interface ${iface}\n"
|
||||||
@ -110,8 +110,8 @@ _system_nis()
|
|||||||
system_pre_start()
|
system_pre_start()
|
||||||
{
|
{
|
||||||
_system_dns
|
_system_dns
|
||||||
_system_ntp
|
_system_ntp
|
||||||
_system_nis
|
_system_nis
|
||||||
|
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
@ -68,7 +68,7 @@ vlan_post_start()
|
|||||||
local vlans=
|
local vlans=
|
||||||
eval vlans=\$vlans_${IFVAR}
|
eval vlans=\$vlans_${IFVAR}
|
||||||
[ -z "${vlans}" ] && return 0
|
[ -z "${vlans}" ] && return 0
|
||||||
|
|
||||||
_check_vlan || return 1
|
_check_vlan || return 1
|
||||||
_exists || return 1
|
_exists || return 1
|
||||||
|
|
||||||
@ -95,7 +95,7 @@ vlan_post_start()
|
|||||||
start
|
start
|
||||||
) || mark_service_stopped "net.${ifname}"
|
) || mark_service_stopped "net.${ifname}"
|
||||||
done
|
done
|
||||||
|
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -149,7 +149,7 @@ wpa_supplicant_pre_start()
|
|||||||
if [ -z "${wpac}" ]; then
|
if [ -z "${wpac}" ]; then
|
||||||
if service_started devd; then
|
if service_started devd; then
|
||||||
ebegin "Backgrounding ..."
|
ebegin "Backgrounding ..."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
@ -167,7 +167,7 @@ wpa_supplicant_pre_start()
|
|||||||
-P "/var/run/wpa_cli-${IFACE}.pid" -B
|
-P "/var/run/wpa_cli-${IFACE}.pid" -B
|
||||||
if eend $?; then
|
if eend $?; then
|
||||||
ebegin "Backgrounding ..."
|
ebegin "Backgrounding ..."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# wpa_cli failed to start? OK, error here
|
# wpa_cli failed to start? OK, error here
|
||||||
|
@ -34,7 +34,7 @@ mount_svcdir()
|
|||||||
[ $? -eq 0 ] && return 0
|
[ $? -eq 0 ] && return 0
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if grep -Eq "[[:space:]]+ramfs$" /proc/filesystems; then
|
if grep -Eq "[[:space:]]+ramfs$" /proc/filesystems; then
|
||||||
fs="ramfs"
|
fs="ramfs"
|
||||||
# ramfs has no special options
|
# ramfs has no special options
|
||||||
|
@ -111,7 +111,7 @@ start()
|
|||||||
[ -n "$command" ] || return 0
|
[ -n "$command" ] || return 0
|
||||||
local _background=
|
local _background=
|
||||||
ebegin "Starting ${name:-$RC_SVCNAME}"
|
ebegin "Starting ${name:-$RC_SVCNAME}"
|
||||||
if yesno "${command_background}"; then
|
if yesno "${command_background}"; then
|
||||||
_background="--background --pidfile"
|
_background="--background --pidfile"
|
||||||
fi
|
fi
|
||||||
if yesno "$start_inactive"; then
|
if yesno "$start_inactive"; then
|
||||||
@ -252,7 +252,7 @@ while [ -n "$1" ]; do
|
|||||||
eerror "$RC_SVCNAME: function \`$1' defined but does not exist"
|
eerror "$RC_SVCNAME: function \`$1' defined but does not exist"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
eerror "$RC_SVCNAME: unknown function \`$1'"
|
eerror "$RC_SVCNAME: unknown function \`$1'"
|
||||||
|
@ -152,7 +152,7 @@ do_e(int argc, char **argv)
|
|||||||
ts.tv_nsec = WAIT_INTERVAL;
|
ts.tv_nsec = WAIT_INTERVAL;
|
||||||
for (i = 0; i < argc; i++) {
|
for (i = 0; i < argc; i++) {
|
||||||
ebeginv("Waiting for %s", argv[i]);
|
ebeginv("Waiting for %s", argv[i]);
|
||||||
for (;;){
|
for (;;) {
|
||||||
if (exists(argv[i]))
|
if (exists(argv[i]))
|
||||||
break;
|
break;
|
||||||
if (nanosleep(&ts, NULL) == -1)
|
if (nanosleep(&ts, NULL) == -1)
|
||||||
|
Loading…
Reference in New Issue
Block a user