From 4c6858a1213d0b967aa767f6aca72e37b79cee8d Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Sun, 13 Mar 2016 05:08:49 +0100 Subject: rhautoimport launcher now passes through all but the first arguments diff --git a/rhautoimport b/rhautoimport index f7c52c4..2518231 100755 --- a/rhautoimport +++ b/rhautoimport @@ -22,7 +22,7 @@ # if [ -z "$1" ]; then - echo "rhautoimport [ last ]" + echo "rhautoimport [ 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 -- cgit v0.10.2