[Lunar-commits] <moonbase> cron-common, logrotate: Removed basename from plugins and replaced them with bashism
Stefan Wold
ratler at lunar-linux.org
Sun Nov 8 10:27:31 CET 2009
commit c5a5d24c83ace9ae3b330ba0c75ae738947b8470
Author: Stefan Wold <ratler at lunar-linux.org>
Date: Sun Nov 8 10:27:31 2009 +0100
cron-common, logrotate: Removed basename from plugins and replaced them with bashism
---
utils/cron-common/plugin.d/cron.plugin | 4 ++--
utils/logrotate/plugin.d/logrotate.plugin | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/utils/cron-common/plugin.d/cron.plugin b/utils/cron-common/plugin.d/cron.plugin
index f3cd192..b857927 100644
--- a/utils/cron-common/plugin.d/cron.plugin
+++ b/utils/cron-common/plugin.d/cron.plugin
@@ -24,8 +24,8 @@ plugin_cron_post_build()
[ -d /etc/$DIR ] || mkdir -p /etc/$DIR
for FILE in $SCRIPT_DIRECTORY/$DIR/*; do
- if [ ! -f /etc/$DIR/$(basename $FILE) ]; then
- verbose_msg "Installing $(basename $FILE) into /etc/$DIR"
+ if [ ! -f /etc/$DIR/${FILE##*/} ]; then
+ verbose_msg "Installing ${FILE##*/} into /etc/$DIR"
if [ "$DIR" == "cron.d" ]; then
/usr/bin/install -g 0 -o 0 -m 0644 $FILE /etc/$DIR/
else
diff --git a/utils/logrotate/plugin.d/logrotate.plugin b/utils/logrotate/plugin.d/logrotate.plugin
index 72cbbff..acf43b6 100644
--- a/utils/logrotate/plugin.d/logrotate.plugin
+++ b/utils/logrotate/plugin.d/logrotate.plugin
@@ -24,7 +24,7 @@ plugin_logrotate_post_build()
[ -d $LOGDPATH ] || mkdir -p $LOGDPATH
for FILE in $SPATH/*; do
- if [ ! -f $LOGDPATH/$(basename $FILE) ]; then
+ if [ ! -f $LOGDPATH/${FILE##*/} ]; then
/usr/bin/install -g 0 -o 0 -m 0644 $FILE $LOGDPATH/
fi
done
More information about the Lunar-commits
mailing list