aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xcron-sh/security.sh14
-rw-r--r--po/Makefile4
2 files changed, 12 insertions, 6 deletions
diff --git a/cron-sh/security.sh b/cron-sh/security.sh
index 199e391..41bcf78 100755
--- a/cron-sh/security.sh
+++ b/cron-sh/security.sh
@@ -4,17 +4,21 @@
# which should be named NN_script_name.sh, where NN represents
# the order in which they should be executed
+export TEXTDOMAINDIR=/usr/share/locale
+export TEXTDOMAIN=msec
+. gettext.sh
+
if [[ -f /etc/security/msec/security.conf ]]; then
# load settings from base level
BASE_LEVEL=$(sed -n 's/BASE_LEVEL=//p' /etc/security/msec/security.conf)
if [[ ! -f /etc/security/msec/level.$BASE_LEVEL ]]; then
- echo "Error: base level $BASE_LEVEL not found"
+ eval_gettext "Error: base level \$BASE_LEVEL not found"; echo
exit 1
fi
. /etc/security/msec/level.$BASE_LEVEL
. /etc/security/msec/security.conf
else
- echo "/etc/security/msec/security.conf don't exist."
+ eval_gettext "/etc/security/msec/security.conf don't exist."; echo
exit 1
fi
@@ -85,7 +89,7 @@ for script in /usr/share/msec/scripts/*sh; do
test -x $script && . $script
ret=$?
if [ $ret -ne 0 ]; then
- echo "MSEC: audit script $script failed"
+ eval_gettext "MSEC: audit script \$script failed"; echo
fi
done
@@ -120,7 +124,7 @@ if [[ -s ${SECURITY} ]]; then
cat ${MSEC_TMP} > ${MAIL_LOG_TODAY}
Maillog "[msec] *** Security Check on ${REPORT_HOSTNAME}, ${REPORT_DATE} ***" "${MSEC_TMP}"
- Notifylog "MSEC has performed Security Check on ${REPORT_HOSTNAME} on ${REPORT_DATE}. Detailed results are available in ${MAIL_LOG_TODAY}"
+ Notifylog "`eval_gettext \"MSEC has performed Security Check on \\\${REPORT_HOSTNAME} on \\\${REPORT_DATE}. Detailed results are available in \\\${MAIL_LOG_TODAY}\"`"
fi
# diff check
@@ -131,7 +135,7 @@ if [[ -s ${DIFF} ]]; then
echo "$DIFF_PREFIX *** Diff Check, ${REPORT_DATE} ***" >> ${SECURITY_LOG}
cat ${DIFF} | sed -e "s/^/$DIFF_PREFIX/g" >> ${SECURITY_LOG}
- Notifylog "MSEC has performed Diff Check on ${REPORT_HOSTNAME} on ${REPORT_DATE}. Changes in system security were detected and are available in ${SECURITY_LOG}."
+ Notifylog "`eval_gettext \"MSEC has performed Diff Check on \\\${REPORT_HOSTNAME} on \\\${REPORT_DATE}. Changes in system security were detected and are available in \\\${SECURITY_LOG}.\"`"
fi
Maillog "[msec] *** Diff Check on ${REPORT_HOSTNAME}, ${REPORT_DATE} ***" "${DIFF}"
diff --git a/po/Makefile b/po/Makefile
index a671640..52f166f 100644
--- a/po/Makefile
+++ b/po/Makefile
@@ -11,6 +11,7 @@ PL_FILES = ../src/msec/msec.py ../src/msec/msecperms.py ../src/msec/help.py \
../src/msec/plugins/pam.py ../src/msec/plugins/network.py \
../src/msec/plugins/msec.py ../src/msec/plugins/sectool.py \
../src/msec/plugins/sudo.py ../src/msec/plugins/log.py
+SHELL_FILES =../cron-sh/security.sh
# C-like files to search translatable strings in
#CFILES =
@@ -42,7 +43,8 @@ help:
make -C ../src/msec help
$(PGOAL).pot: $(PL_FILES)
- ./pygettext.py -o $(PGOAL).pot $(PL_FILES)
+ ./pygettext.py -k eval_gettext -o $(PGOAL).pot $(PL_FILES)
+ xgettext -L Shell --strict -c -n --omit-header --output - $(SHELL_FILES) >> $(PGOAL).pot
update_n_merge: $(PGOAL).pot merge