diff options
-rwxr-xr-x | rhautoimport | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/rhautoimport b/rhautoimport index f7c52c4..2518231 100755 --- a/rhautoimport +++ b/rhautoimport @@ -22,7 +22,7 @@ # if [ -z "$1" ]; then - echo "rhautoimport <importer> [ last ]" + echo "rhautoimport <importer> [ arg1 [ arg2 ] ... ]" exit 1 fi @@ -61,10 +61,10 @@ if [ -z "$MAIL_TO" ]; then MAIL_TO="root" fi -/usr/bin/rhautoimport-$1 $2 > $LOG_FILE 2>&1 +/usr/bin/rhautoimport-$1 ${@:2} > $LOG_FILE 2>&1 case $? in 0) - /usr/bin/mail -a "Content-Type: text/plain; charset=utf-8" -s "$TITLE - Imported Successfully" $MAIL_TO < $LOG_FILE + mail -a "Content-Type: text/plain; charset=utf-8" -s "$TITLE - Imported Successfully" $MAIL_TO < $LOG_FILE ;; 42) # do nothing - the script didn't import anything but no message should be sent @@ -75,7 +75,7 @@ case $? in else subject="$TITLE - Import Error - will retry" fi - /usr/bin/mail -a "Content-Type: text/plain; charset=utf-8" -s "$subject" $MAIL_TO < $LOG_FILE + mail -a "Content-Type: text/plain; charset=utf-8" -s "$subject" $MAIL_TO < $LOG_FILE ;; esac |