remove dependency on initscripts (#1098172)
This commit is contained in:
parent
b7e832e280
commit
27892ea741
@ -654,6 +654,53 @@ dh6config() {
|
|||||||
execute_client_side_configuration_scripts "config"
|
execute_client_side_configuration_scripts "config"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Functions from /etc/sysconfig/network-scripts/network-functions
|
||||||
|
|
||||||
|
need_hostname ()
|
||||||
|
{
|
||||||
|
CHECK_HOSTNAME=$(hostname)
|
||||||
|
if [ "$CHECK_HOSTNAME" = "(none)" -o "$CHECK_HOSTNAME" = "localhost" -o \
|
||||||
|
"$CHECK_HOSTNAME" = "localhost.localdomain" ]; then
|
||||||
|
return 0
|
||||||
|
else
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
change_resolv_conf ()
|
||||||
|
{
|
||||||
|
s=$(grep '^[\ \ ]*option' /etc/resolv.conf 2>/dev/null);
|
||||||
|
if [ $# -eq 1 ]; then
|
||||||
|
if [ "x$s" != "x" ]; then
|
||||||
|
s="$s"$'\n'$(grep -vF "$s" $1);
|
||||||
|
else
|
||||||
|
s=$(cat $1);
|
||||||
|
fi;
|
||||||
|
fi;
|
||||||
|
(echo "$s" > /etc/resolv.conf;) >/dev/null 2>&1;
|
||||||
|
r=$?;
|
||||||
|
if [ $r -eq 0 ]; then
|
||||||
|
logger -p local7.notice -t "NET" -i "$0 : updated /etc/resolv.conf";
|
||||||
|
[ -e /var/run/nscd/socket ] && /usr/sbin/nscd -i hosts; # invalidate cache
|
||||||
|
fi;
|
||||||
|
return $r;
|
||||||
|
}
|
||||||
|
|
||||||
|
need_config ()
|
||||||
|
{
|
||||||
|
# Do we really need this ?
|
||||||
|
# The original one from /etc/sysconfig/network-scripts/network-functions
|
||||||
|
# seems to set CONFIG variable, which we don't use anywhere AFAICT.
|
||||||
|
:
|
||||||
|
}
|
||||||
|
|
||||||
|
source_config ()
|
||||||
|
{
|
||||||
|
# Do we really need to source /etc/sysconfig/network-scripts/$CONFIG ?
|
||||||
|
# I don't think we use for example
|
||||||
|
# DEVNAME, DEVICE, DEVICETYPE, HWADDR, MACADDR, ISALIAS or UUID anywhere.
|
||||||
|
:
|
||||||
|
}
|
||||||
|
|
||||||
#
|
#
|
||||||
# ### MAIN
|
# ### MAIN
|
||||||
@ -663,19 +710,6 @@ dh6config() {
|
|||||||
run_hook "${ETCDIR}/dhclient-enter-hooks" || exit $?
|
run_hook "${ETCDIR}/dhclient-enter-hooks" || exit $?
|
||||||
run_hookdir "${ETCDIR}/dhclient-enter-hooks.d" || exit $?
|
run_hookdir "${ETCDIR}/dhclient-enter-hooks.d" || exit $?
|
||||||
|
|
||||||
if [ ! -r /etc/sysconfig/network-scripts/network-functions ]; then
|
|
||||||
echo "Missing /etc/sysconfig/network-scripts/network-functions, exiting." >&2
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ ! -r /etc/rc.d/init.d/functions ]; then
|
|
||||||
echo "Missing /etc/rc.d/init.d/functions, exiting." >&2
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
. /etc/sysconfig/network-scripts/network-functions
|
|
||||||
. /etc/rc.d/init.d/functions
|
|
||||||
|
|
||||||
if [ -f /etc/sysconfig/network ]; then
|
if [ -f /etc/sysconfig/network ]; then
|
||||||
. /etc/sysconfig/network
|
. /etc/sysconfig/network
|
||||||
fi
|
fi
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
Summary: Dynamic host configuration protocol software
|
Summary: Dynamic host configuration protocol software
|
||||||
Name: dhcp
|
Name: dhcp
|
||||||
Version: 4.3.2
|
Version: 4.3.2
|
||||||
Release: 10%{?dist}
|
Release: 11%{?dist}
|
||||||
# NEVER CHANGE THE EPOCH on this package. The previous maintainer (prior to
|
# NEVER CHANGE THE EPOCH on this package. The previous maintainer (prior to
|
||||||
# dcantrell maintaining the package) made incorrect use of the epoch and
|
# dcantrell maintaining the package) made incorrect use of the epoch and
|
||||||
# that's why it is at 12 now. It should have never been used, but it was.
|
# that's why it is at 12 now. It should have never been used, but it was.
|
||||||
@ -155,7 +155,7 @@ Summary: Provides the ISC DHCP client daemon and dhclient-script
|
|||||||
Provides: dhclient = %{epoch}:%{version}-%{release}
|
Provides: dhclient = %{epoch}:%{version}-%{release}
|
||||||
Obsoletes: dhclient < %{epoch}:%{version}-%{release}
|
Obsoletes: dhclient < %{epoch}:%{version}-%{release}
|
||||||
# dhclient-script requires:
|
# dhclient-script requires:
|
||||||
Requires: coreutils grep hostname initscripts iproute iputils sed gawk /usr/bin/ipcalc
|
Requires: coreutils grep sed gawk hostname iproute iputils /bin/ipcalc
|
||||||
Requires: %{name}-common = %{epoch}:%{version}-%{release}
|
Requires: %{name}-common = %{epoch}:%{version}-%{release}
|
||||||
Requires: %{name}-libs%{?_isa} = %{epoch}:%{version}-%{release}
|
Requires: %{name}-libs%{?_isa} = %{epoch}:%{version}-%{release}
|
||||||
|
|
||||||
@ -675,6 +675,9 @@ done
|
|||||||
%doc doc/html/
|
%doc doc/html/
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Jul 14 2015 Jiri Popelka <jpopelka@redhat.com> - 12:4.3.2-11
|
||||||
|
- remove dependency on initscripts (#1098172)
|
||||||
|
|
||||||
* Thu Jul 09 2015 Jiri Popelka <jpopelka@redhat.com> - 12:4.3.2-10
|
* Thu Jul 09 2015 Jiri Popelka <jpopelka@redhat.com> - 12:4.3.2-10
|
||||||
- spec cleanup
|
- spec cleanup
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user