Accepting request 198233 from network:dhcp
- Fixed to reload syslog on hostname changes using systemctl as there is no /etc/init.d/syslog script since syslog-service-2.0 (bnc#830467). OBS-URL: https://build.opensuse.org/request/show/198233 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/dhcp?expand=0&rev=81
This commit is contained in:
commit
b1fdb7abc7
@ -256,7 +256,7 @@ set_hostname()
|
||||
if [ -x /usr/bin/host ] ; then
|
||||
if out=`host -W 2 "$new_ip_address" 2>/dev/null` ; then
|
||||
_hostname="`echo "$out" | sed 's:^.* ::; s:\..*::; s:.*[)]::'`"
|
||||
[[ ${_hostname} =~ ${rx_host} ]] || unset _hostname
|
||||
[[ ${_hostname} =~ ${rx_host} ]] || unset _hostname
|
||||
if [ "x${_hostname}" != "x" -a \
|
||||
"x${_hostname}" != "x${current_hostname}" ]; then
|
||||
hostname "${_hostname}"
|
||||
@ -279,7 +279,11 @@ set_hostname()
|
||||
commit_cached_config_data $interface
|
||||
|
||||
# reload syslog so it knows the new hostname
|
||||
/etc/init.d/syslog reload
|
||||
if test -x /usr/sbin/systemctl ; then
|
||||
/usr/sbin/systemctl reload syslog.service
|
||||
else
|
||||
/etc/init.d/syslog reload
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
}
|
||||
@ -311,7 +315,7 @@ dhclient)
|
||||
# STARTMODE
|
||||
eval `grep --no-filename \
|
||||
'^[[:space:]]*STARTMODE=' \
|
||||
"$SYSCONFIG_CFG_DIR/ifcfg-${interface}" 2>/dev/null`
|
||||
"$SYSCONFIG_CFG_DIR/ifcfg-${interface}" 2>/dev/null`
|
||||
tmp_startmode=`read_cached_config_data startmode $INTERFACE`
|
||||
[ -n "$tmp_startmode" ] && STARTMODE="$tmp_startmode"
|
||||
|
||||
@ -360,7 +364,7 @@ dhclient6)
|
||||
# STARTMODE
|
||||
eval `grep --no-filename \
|
||||
'^[[:space:]]*STARTMODE=' \
|
||||
"$SYSCONFIG_CFG_DIR/ifcfg-${interface}" 2>/dev/null`
|
||||
"$SYSCONFIG_CFG_DIR/ifcfg-${interface}" 2>/dev/null`
|
||||
tmp_startmode=`read_cached_config_data startmode $INTERFACE`
|
||||
[ -n "$tmp_startmode" ] && STARTMODE="$tmp_startmode"
|
||||
else
|
||||
|
@ -1,3 +1,10 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Sep 10 13:04:10 UTC 2013 - mt@suse.com
|
||||
|
||||
- Fixed to reload syslog on hostname changes using systemctl as
|
||||
there is no /etc/init.d/syslog script since syslog-service-2.0
|
||||
(bnc#830467).
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Apr 26 09:27:19 UTC 2013 - mmeister@suse.com
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user