diff options
author | Marek Wodzinski <majek@w7i.pl> | 2024-07-27 01:24:05 +0200 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2024-07-27 08:16:15 +0700 |
commit | be3f33936705c16ce2885e4c497f0e3fdf1c5fac (patch) | |
tree | 212a3d936c92d8286ee5f4b470ba45c1176f90a7 | |
parent | ccafdd5fe64328c4babca094e559b3d3f2355314 (diff) |
system/targetcli-fb: Added rc script.
Signed-off-by: Andrew Clemons <andrew.clemons@gmail.com>
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
-rw-r--r-- | system/targetcli-fb/doinst.sh | 25 | ||||
-rw-r--r-- | system/targetcli-fb/targetcli-fb.SlackBuild | 6 | ||||
-rw-r--r-- | system/targetcli-fb/targetcli-fb.info | 6 |
3 files changed, 34 insertions, 3 deletions
diff --git a/system/targetcli-fb/doinst.sh b/system/targetcli-fb/doinst.sh new file mode 100644 index 000000000000..5c831cb6cc48 --- /dev/null +++ b/system/targetcli-fb/doinst.sh @@ -0,0 +1,25 @@ +config() { + NEW="$1" + OLD="$(dirname $NEW)/$(basename $NEW .new)" + # If there's no config file by that name, mv it over: + if [ ! -r $OLD ]; then + mv $NEW $OLD + elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then + # toss the redundant copy + rm $NEW + fi + # 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 +} + +preserve_perms etc/rc.d/rc.target.new diff --git a/system/targetcli-fb/targetcli-fb.SlackBuild b/system/targetcli-fb/targetcli-fb.SlackBuild index 7a949d37e7d5..dd7e6b7b5d80 100644 --- a/system/targetcli-fb/targetcli-fb.SlackBuild +++ b/system/targetcli-fb/targetcli-fb.SlackBuild @@ -29,7 +29,7 @@ PRGNAM=targetcli-fb VERSION=${VERSION:-2.1.58} RTVERSION=${RTVERSION:-2.1.76} CSVERSION=${CSVERSION:-1.1.30} -BUILD=${BUILD:-2} +BUILD=${BUILD:-3} TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} @@ -118,6 +118,10 @@ 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 + +mkdir -p $PKG/etc/rc.d +cat $CWD/target.init > $PKG/etc/rc.d/rc.target.new cd $PKG /sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE diff --git a/system/targetcli-fb/targetcli-fb.info b/system/targetcli-fb/targetcli-fb.info index 49f9921c65d1..c6bd7f9ce9ee 100644 --- a/system/targetcli-fb/targetcli-fb.info +++ b/system/targetcli-fb/targetcli-fb.info @@ -3,10 +3,12 @@ VERSION="2.1.58" HOMEPAGE="https://github.com/open-iscsi/targetcli-fb" DOWNLOAD="https://github.com/open-iscsi/targetcli-fb/archive/v2.1.58/targetcli-fb-2.1.58.tar.gz \ https://github.com/open-iscsi/rtslib-fb/archive/v2.1.76/rtslib-fb-2.1.76.tar.gz \ - https://github.com/open-iscsi/configshell-fb/archive/v1.1.30/configshell-fb-1.1.30.tar.gz" + https://github.com/open-iscsi/configshell-fb/archive/v1.1.30/configshell-fb-1.1.30.tar.gz \ + https://raw.githubusercontent.com/open-iscsi/targetcli-fb/bfbb996c6d0ed7b5bf6f6e2fe25125877aa8eb5c/debian/target.init" MD5SUM="33ba115c73507d50c6e0fafb83695d90 \ 257d79770918799c0a779bf2fad0f7ea \ - 4d4ee409b5fad8b8ccf05f4457b23601" + 4d4ee409b5fad8b8ccf05f4457b23601 \ + 7db8f8076b5e471aa92fdcd488ed01c1" DOWNLOAD_x86_64="" MD5SUM_x86_64="" REQUIRES="python3-pyudev" |