diff options
Diffstat (limited to 'system/drbd-tools')
-rw-r--r-- | system/drbd-tools/doinst.sh | 23 | ||||
-rw-r--r-- | system/drbd-tools/drbd-tools.SlackBuild | 1 |
2 files changed, 15 insertions, 9 deletions
diff --git a/system/drbd-tools/doinst.sh b/system/drbd-tools/doinst.sh index 5963b24bb2509..dd9569973fcd0 100644 --- a/system/drbd-tools/doinst.sh +++ b/system/drbd-tools/doinst.sh @@ -11,13 +11,18 @@ config() { # Otherwise, we leave the .new copy for the admin to consider... } -# Keep same perms on rc.drbd.new: -if [ -e etc/rc.d/rc.drbd ]; then - cp -a etc/rc.d/rc.drbd etc/rc.d/rc.drbd.new.incoming - cat etc/rc.d/rc.drbd.new > etc/rc.d/rc.drbd.new.incoming - mv etc/rc.d/rc.drbd.new.incoming etc/rc.d/rc.drbd.new -fi +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 +} + +preserve_perms etc/rc.d/rc.drbd.new +preserve_perms etc/drbd.conf.new +preserve_perms etc/drbd.d/global_common.conf.new -config etc/rc.d/rc.drbd.new -config etc/drbd.conf.new -config etc/drbd.d/global_common.conf.new diff --git a/system/drbd-tools/drbd-tools.SlackBuild b/system/drbd-tools/drbd-tools.SlackBuild index 26f6f6ab8dd87..fe8b0aaeec8d6 100644 --- a/system/drbd-tools/drbd-tools.SlackBuild +++ b/system/drbd-tools/drbd-tools.SlackBuild @@ -102,6 +102,7 @@ cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc +cat $CWD/doinst.sh > $PKG/install/doinst.sh cd $PKG /sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} |