File sysconfig-do-not-create-ntp-dir.bnc443326.diff of Package sysconfig
Index: scripts/ifup-dhcp
===================================================================
--- scripts/ifup-dhcp (Revision 1808)
+++ scripts/ifup-dhcp (Arbeitskopie)
@@ -375,12 +375,6 @@
case "$ACTION" in
start|renew)
- # Create the ntp runtime cache dir before the dhcp client is started.
- # Netconfig writes the /var/run/ntp/servers-netconfig file containing
- # the ntp server list that is picked up by the ntp init script to apply
- # the ntp servers at runtime to the ntpd.
- test -d "/var/run/ntp" || mkdir -p "/var/run/ntp"
-
# if we were called at boot time, increase the time startproc waits,
# because the next scripts might rely on a configured network
# test "$MODE" = "boot" && STARTPROC_TIMEOUT=5
Index: scripts/netconfig.d/ntp-runtime
===================================================================
--- scripts/netconfig.d/ntp-runtime (Revision 1808)
+++ scripts/netconfig.d/ntp-runtime (Arbeitskopie)
@@ -54,13 +54,16 @@
debug "write_ntp_servers: $1"
+ # make sure that the directory exists
+ test -d "${DESTFILE%/*}" || {
+ debug "no ${DESTFILE%/*} directory - skipping"
+ return 1
+ }
+
local SERVERS
TMP_FILE=`mktemp "$r/tmp/ntp-servers-netconfig.XXXXXX"` || return 1
- # make sure that the directory exists
- mkdir -p "${DESTFILE%/*}"
-
if test ! -s "$DESTFILE" ; then
touch "$DESTFILE" ; chmod 644 "$DESTFILE"
fi