From: dzeus Date: Sun, 1 Feb 2009 09:29:48 +0000 (+0000) Subject: - FORCE_USER option X-Git-Tag: auto/th/awffull-3_10_2-4~4 X-Git-Url: https://git.pld-linux.org/?a=commitdiff_plain;h=0669167b1a82a80e8585bcd9929d9d6c7f8bace0;hp=5440e40aa842b4933b30d1588c5500ea101fa379;p=packages%2Fawffull.git - FORCE_USER option Changed files: awffull.cron -> 1.9 awffull.sysconfig -> 1.4 --- diff --git a/awffull.cron b/awffull.cron index e1b782f..1dc4e49 100644 --- a/awffull.cron +++ b/awffull.cron @@ -5,6 +5,13 @@ CONFIG_LIST="" [ -f /etc/sysconfig/awffull ] && . /etc/sysconfig/awffull umask 0022 +if [ -n "$FORCE_USER" ]; then + if [ "$FORCE_USER" != "`id -un`" ]; then + echo "Wrong current user. $FORCE_USER is required!" + exit 1 + fi +fi + if [ -n "$ENABLE" ] && [ "$ENABLE" = "yes" -o "$ENABLE" = "YES" ]; then LC_ALL=$LANG export LANG diff --git a/awffull.sysconfig b/awffull.sysconfig index 0f982c5..e4b30af 100644 --- a/awffull.sysconfig +++ b/awffull.sysconfig @@ -4,7 +4,7 @@ ENABLE="no" # Output language -# LANG="pl_PL" +# LANG="pl_PL.UTF-8" # Allow multiple configs in /etc/awffull/ # Files must have names: *.conf @@ -20,5 +20,7 @@ MULTIPLE="yes" # QUIET="yes" # Don't display any messages -#REALLY_QUIET="yes" +# REALLY_QUIET="yes" +# Force checking if awffull is done with proper user rights +FORCE_USER="stats"