system/targetcli-fb: Added rc script.
Signed-off-by: Andrew Clemons <andrew.clemons@gmail.com> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
parent
ccafdd5fe6
commit
be3f339367
|
@ -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
|
|
@ -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
|
||||
|
|
|
@ -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"
|
||||
|
|
Loading…
Reference in New Issue