# HG changeset patch # User Christopher Rogers # Date 1321532096 0 # Node ID 1d1dade306e84cca0e58434f6f07b2b96528a347 # Parent 5f1950d053b249d57a6bdb57389cde5118e603d7 local-mirror: Copy /usr/bin/makegraphs to $MAIN_WWW_DIR/pics/makegraphs so home boot option will make disk and network graphs pics. diff -r 5f1950d053b2 -r 1d1dade306e8 initramfs/usr/bin/local-mirror --- a/initramfs/usr/bin/local-mirror Wed Nov 16 16:17:22 2011 +0000 +++ b/initramfs/usr/bin/local-mirror Thu Nov 17 12:14:56 2011 +0000 @@ -229,9 +229,10 @@ [ -d $MAIN_WWW_DIR/mirror-info/pics ] || mkdir -p $MAIN_WWW_DIR/mirror-info/pics [ -d $MAIN_WWW_DIR/mirror-info/pics/rrd ] || ln -sf $MAIN_WWW_DIR/pics/rrd $MAIN_WWW_DIR/mirror-info/pics/rrd if [ -f /usr/bin/makegraphs ]; then - if [ ! $(grep -l "/usr/bin/makegraphs" $CRON_FILE) ]; then + [ -f $MAIN_WWW_DIR/pics/makegraphs ] || cp -a /usr/bin/makegraphs $MAIN_WWW_DIR/pics/makegraphs + if [ ! $(grep -l "$MAIN_WWW_DIR/pics/makegraphs" $CRON_FILE) ]; then echo "# Update system load graphics" >> $CRON_FILE - echo "*/5 * * * * /usr/bin/makegraphs" >> $CRON_FILE + echo "*/5 * * * * $MAIN_WWW_DIR/pics/makegraphs" >> $CRON_FILE fi fi ;; @@ -258,9 +259,10 @@ fi fi if [ -f /usr/bin/makegraphs ]; then - if [ ! $(grep -l "/usr/bin/makegraphs" $CRON_FILE) ]; then + [ -f $MAIN_WWW_DIR/pics/makegraphs ] || cp -a /usr/bin/makegraphs $MAIN_WWW_DIR/pics/makegraphs + if [ ! $(grep -l "$MAIN_WWW_DIR/pics/makegraphs" $CRON_FILE) ]; then echo "# Update system load graphics" >> $CRON_FILE - echo "*/5 * * * * /usr/bin/makegraphs" >> $CRON_FILE + echo "*/5 * * * * $MAIN_WWW_DIR/pics/makegraphs" >> $CRON_FILE fi fi ;;