Fix lfs/cacti script
authorroot <root@ipfire-build.home>
Fri, 4 Sep 2009 20:23:51 +0000 (22:23 +0200)
committerroot <root@ipfire-build.home>
Fri, 4 Sep 2009 20:23:51 +0000 (22:23 +0200)
Fixed the mkdir directive to be fault tolerant from previous build.

lfs/cacti

index 0771d7582e530974e17ccd6ca7a6c79de365d55f..45d226abc38b86d920461e864704b064b8194169 100644 (file)
--- a/lfs/cacti
+++ b/lfs/cacti
@@ -85,11 +85,14 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
        install -v -m 755 $(DIR_SRC)/config/cacti/cacti.cron /etc/fcron.cyclic/cacti.cron
        install -v -m 644 $(DIR_SRC)/config/backup/includes/cacti \
                         /var/ipfire/backup/addons/includes/cacti
-       mkdir /var/cacti && mkdir /var/cacti/rra && mkdir /var/cacti/log 
-       mv -vf /usr/share/cacti/log /var/cacti
-       mv -vf /usr/share/cacti/rra /var/cacti
+       if [ ! -x "/var/cacti" ]; then mkdir /var/cacti;fi
+       if [ ! -x "/var/cacti/rra" ]; then mkdir /var/cacti/rra; fi
+       if [ ! -x "/var/cacti/log" ]; then mkdir /var/cacti/log; fi
+       mv -vf /usr/share/cacti/log/* /var/cacti/log/
+       mv -vf /usr/share/cacti/rra/* /var/cacti/rra
        ln -s /var/cacti/log /usr/share/cacti/log
        ln -s /var/cacti/rra /usr/share/cacti/rra
        chown -R nobody:nobody /var/cacti/rra /var/cacti/log
        @rm -rf $(DIR_APP)
        @$(POSTBUILD)
+