--- network 2010-03-06 22:04:14.537456936 -0800 +++ /usr/lib/network/network 2010-03-06 22:04:27.697166996 -0800 @@ -167,14 +167,16 @@ # Successfully running a new profile; erase any suspended profiles on this interface local iface="$INTERFACE" - find "$STATE_DIR/suspend/" -maxdepth 1 -type f -printf '%f\n' \ - | while read prof; do - # the pipe to "while read" will create a subshell - INTERFACE=$(. "$STATE_DIR/suspend/$prof"; echo "$INTERFACE") - if [[ "$iface" == "$INTERFACE" ]]; then - rm "$STATE_DIR/suspend/$prof" - fi - done + if [ -d "$STATE_DIR/suspend" ]; then + find "$STATE_DIR/suspend/" -maxdepth 1 -type f -printf '%f\n' \ + | while read prof; do + # the pipe to "while read" will create a subshell + INTERFACE=$(. "$STATE_DIR/suspend/$prof"; echo "$INTERFACE") + if [[ "$iface" == "$INTERFACE" ]]; then + rm "$STATE_DIR/suspend/$prof" + fi + done + fi report_success ); return $?