metrics dir may not exist.
authorRoy Marples <roy@marples.name>
Tue, 16 Sep 2008 08:26:41 +0000 (08:26 +0000)
committerRoy Marples <roy@marples.name>
Tue, 16 Sep 2008 08:26:41 +0000 (08:26 +0000)
resolvconf.in

index 0001126c09fe9f02178e7ef20f8edfb63212b04c..f38b354a3afab9a2a4885ba0f35ba83fe408e282 100755 (executable)
@@ -213,10 +213,12 @@ if [ "${CMD}" = "l" -o "${CMD}" = "i" ]; then
        # and then anything else.
        if [ -z "${LIST}" ]; then
                LIST="lo lo[0-9]* "
-               cd "${METRICDIR}"
-               for METRIC in *; do
-                       LIST="${LIST} ${METRIC#* }"
-               done
+               if [ -d "${METRCICDIR}" ]; then
+                       cd "${METRICDIR}"
+                       for METRIC in *; do
+                               LIST="${LIST} ${METRIC#* }"
+                       done
+               fi
                LIST="${LIST} tap[0-9]* tun[0-9]* vpn vpn[0-9]* ppp[0-9]* ippp[0-9]* *"
        fi