Changeset View
Changeset View
Standalone View
Standalone View
libexec/rc/rc.d/dhclient
Show First 20 Lines • Show All 43 Lines • ▼ Show 20 Lines | if [ -z "$flags" -a -n "$specific" ]; then | ||||
rc_flags=$specific | rc_flags=$specific | ||||
fi | fi | ||||
background_dhclient=$(get_if_var $ifn background_dhclient_IF $background_dhclient) | background_dhclient=$(get_if_var $ifn background_dhclient_IF $background_dhclient) | ||||
if checkyesno background_dhclient; then | if checkyesno background_dhclient; then | ||||
rc_flags="${rc_flags} -b" | rc_flags="${rc_flags} -b" | ||||
fi | fi | ||||
# /var/run/dhclient is not guaranteed to exist, | |||||
# e.g. if /var/run is a tmpfs | |||||
install -d -o root -g wheel -m 755 ${pidfile%/*} | |||||
markj: If the directory is created according to the mtree specification, it'll be owned by root:wheel. | |||||
rc_flags="${rc_flags} ${ifn}" | rc_flags="${rc_flags} ${ifn}" | ||||
} | } | ||||
load_rc_config $name | load_rc_config $name | ||||
load_rc_config network | load_rc_config network | ||||
if [ -z $ifn ] ; then | if [ -z $ifn ] ; then | ||||
# only complain if a command was specified but no interface | # only complain if a command was specified but no interface | ||||
if [ -n "$1" ] ; then | if [ -n "$1" ] ; then | ||||
err 1 "$0: no interface specified" | err 1 "$0: no interface specified" | ||||
fi | fi | ||||
fi | fi | ||||
run_rc_command "$1" | run_rc_command "$1" |
If the directory is created according to the mtree specification, it'll be owned by root:wheel. In particular, dhclient drops privileges after it creates a pidfile. Why does the rc script need to deviate from what we'd get with a clean install?