From 5a9735ce4699ed3a80d7422da0b01d91c4b6779e Mon Sep 17 00:00:00 2001 From: Willy Sudiarto Raharjo Date: Tue, 26 May 2015 07:44:48 +0700 Subject: system/ZoneMinder: Remove duplicate actions + fix permission. Signed-off-by: Willy Sudiarto Raharjo --- system/ZoneMinder/ZoneMinder.SlackBuild | 6 +++++- system/ZoneMinder/doinst.sh | 14 +------------- 2 files changed, 6 insertions(+), 14 deletions(-) (limited to 'system') diff --git a/system/ZoneMinder/ZoneMinder.SlackBuild b/system/ZoneMinder/ZoneMinder.SlackBuild index 4c9acc1aad..b659efa583 100644 --- a/system/ZoneMinder/ZoneMinder.SlackBuild +++ b/system/ZoneMinder/ZoneMinder.SlackBuild @@ -148,13 +148,17 @@ cp -Rp jscalendar-$JSCALENDAR_VERSION/* $PKG$DOCROOT/tools/jscalendar mkdir -p $PKG/usr/share/$PRGNAM/db cp -a db/zm_create.sql db/zm_update-*.sql $PKG/usr/share/$PRGNAM/db +# Fix permissions +mkdir -p $PKG/tmp +chmod 777 $PKG/tmp +chmod +t $PKG/tmp + # Copy documentation mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION cp -a AUTHORS ChangeLog INSTALL NEWS TODO $PKG/usr/doc/$PRGNAM-$VERSION cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild cat $CWD/README.SLACKWARE > $PKG/usr/doc/$PRGNAM-$VERSION/README.SLACKWARE - mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc cat $CWD/doinst.sh > $PKG/install/doinst.sh diff --git a/system/ZoneMinder/doinst.sh b/system/ZoneMinder/doinst.sh index 09e7f396ef..1b16b9b8f2 100644 --- a/system/ZoneMinder/doinst.sh +++ b/system/ZoneMinder/doinst.sh @@ -11,22 +11,10 @@ config() { # Otherwise, we leave the .new copy for the admin to consider... } -preserve_perms() { - NEW="$1" - OLD="$(dirname $NEW)/$(basename $NEW .new)" - if [ -e $OLD ]; then - cp -a $OLD ${NEW}.incoming - cat $NEW > ${NEW}.incoming - mv ${NEW}.incoming $NEW - fi - config $NEW -} - -config etc/rc.d/rc.zm.new config etc/zm/zm.conf.new config etc/zm/zm_apache.conf.new config etc/logrotate.d/zm.new -preserve_perms etc/rc.d/rc.zm.new +config etc/rc.d/rc.zm.new echo "" echo " If this is a new installation, you will need to create a MySQL database" -- cgit v1.2.3