[dhcp] Amend last commit.
Jiří Popelka
jpopelka at fedoraproject.org
Thu Jan 17 17:31:12 UTC 2013
commit de40db7e7696d30c4f2983095a0c42409b95c2e0
Author: Jiri Popelka <jpopelka at redhat.com>
Date: Thu Jan 17 18:30:30 2013 +0100
Amend last commit.
dhcp.spec | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/dhcp.spec b/dhcp.spec
index e6ce6df..96d97bb 100644
--- a/dhcp.spec
+++ b/dhcp.spec
@@ -493,22 +493,22 @@ fi
%triggerun -- dhcp < 12:4.2.4-14.P1
# convert DHC*ARGS from /etc/sysconfig/dhc* to /etc/systemd/system/dhc*.service
for servicename in dhcpd dhcpd6 dhcrelay; do
- if [ -f %{dhcpconfdir}/sysconfig/${servicename} ]; then
+ if [ -f %{_sysconfdir}/sysconfig/${servicename} ]; then
if [ "${servicename}" == "dhcrelay" ]; then
key="DHCRELAYARGS"
else
key="DHCPDARGS"
fi
# get the value of $key from /etc/sysconfig/$servicename
- args=$(grep $key %{dhcpconfdir}/sysconfig/${servicename} | sed -r "s/${key}=\"?([^\"]*)\"?/\1/")
+ args=$(grep "^${key}" %{_sysconfdir}/sysconfig/${servicename} | sed -r "s/${key}=\"?([^\"]*)\"?/\1/")
# value is non-empty (i.e. user modified) and there isn't a service unit yet
- if [ -n "${args}" -a ! -f %{dhcpconfdir}/systemd/system/${servicename}.service ]; then
+ if [ -n "${args}" -a ! -f %{_sysconfdir}/systemd/system/${servicename}.service ]; then
# in $args replace / with \/ otherwise the next sed won't take it
args=$(echo $args | sed 's/\//\\\//'g)
# add $args to the end of ExecStart line
sed -r -e "s/(ExecStart=[^$]*)/\1 ${args}/" \
< %{_unitdir}/${servicename}.service \
- > %{dhcpconfdir}/systemd/system/${servicename}.service
+ > %{_sysconfdir}/systemd/system/${servicename}.service
fi
fi
done
More information about the scm-commits
mailing list