Fixed find -d vs -date and exit status.

This commit is contained in:
louwrentius 2011-08-17 22:36:50 +00:00
parent 3c9a4d5ee8
commit 72e0c983d0
1 changed files with 6 additions and 6 deletions

12
ppss
View File

@ -567,7 +567,7 @@ process_arguments () {
else else
echo "Aborting..." echo "Aborting..."
cleanup cleanup
exit exit 1
fi fi
fi fi
fi fi
@ -592,7 +592,7 @@ process_arguments () {
fi fi
else else
echo "File $SSH_KNOWN_HOSTS does not exist." echo "File $SSH_KNOWN_HOSTS does not exist."
exit exit 1
fi fi
fi fi
shift 2 ;; shift 2 ;;
@ -1814,7 +1814,7 @@ get_all_items () {
check_status "$?" "$FUNCNAME" "Could not list files within remote source directory." check_status "$?" "$FUNCNAME" "Could not list files within remote source directory."
else else
log DEBUG "Recursion is disabled." log DEBUG "Recursion is disabled."
`exec_cmd "find $SRC_DIR/ -d 1 ! -type d" > "$LISTOFITEMS"` `exec_cmd "find $SRC_DIR/ -depth 1 ! -type d" > "$LISTOFITEMS"`
check_status "$?" "$FUNCNAME" "Could not list files within remote source directory." check_status "$?" "$FUNCNAME" "Could not list files within remote source directory."
fi fi
@ -1828,7 +1828,7 @@ get_all_items () {
check_status "$?" "$FUNCNAME" "Could not list files within local source directory." check_status "$?" "$FUNCNAME" "Could not list files within local source directory."
else else
log DEBUG "Recursion is disabled." log DEBUG "Recursion is disabled."
`find "$SRC_DIR"/ -d 1 ! -type d >> "$LISTOFITEMS"` `find "$SRC_DIR"/ -depth 1 ! -type d >> "$LISTOFITEMS"`
check_status "$?" "$FUNCNAME" "Could not list files within local source directory." check_status "$?" "$FUNCNAME" "Could not list files within local source directory."
fi fi
if [ ! -e "$LISTOFITEMS" ] if [ ! -e "$LISTOFITEMS" ]
@ -2787,7 +2787,7 @@ main () {
log DSPLY "Stopping PPSS on all nodes." log DSPLY "Stopping PPSS on all nodes."
exec_cmd "touch $STOP_SIGNAL" exec_cmd "touch $STOP_SIGNAL"
cleanup cleanup
exit exit 0
;; ;;
pause ) pause )
LOGFILE=/dev/null LOGFILE=/dev/null
@ -2795,7 +2795,7 @@ main () {
log DSPLY "Pausing PPSS on all nodes." log DSPLY "Pausing PPSS on all nodes."
exec_cmd "touch $PAUSE_SIGNAL" exec_cmd "touch $PAUSE_SIGNAL"
cleanup cleanup
exit exit 0
;; ;;
continue ) continue )
LOGFILE=/dev/null LOGFILE=/dev/null