]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Detect ntp.conf exists before copying.
authorRoy Marples <roy@marples.name>
Tue, 14 Jun 2011 06:17:40 +0000 (06:17 +0000)
committerRoy Marples <roy@marples.name>
Tue, 14 Jun 2011 06:17:40 +0000 (06:17 +0000)
Fixes Debian #630420

dhcpcd-hooks/50-ntp.conf

index 528ac8721e6cf9be91b6347d6ea1e2b962b41594..aeb02688528f3c4ac72d68ffdc084bc5f62dd031 100644 (file)
@@ -50,7 +50,7 @@ build_ntp_conf()
        [ -d "$ntp_conf_dir" ] || mkdir -p "$ntp_conf_dir"
 
        if [ -n "$NTP_DHCP_CONF" ]; then
-               cp "$ntp_conf" "$cf"
+               [ -e "$ntp_conf" ] && cp "$ntp_conf" "$cf"
                ntp_conf="$NTP_DHCP_CONF"
        elif [ -e "$ntp_conf" ]; then
                remove_markers "$signature_base" "$signature_base_end" \