Commit 73e9ac66 authored by David Spencer's avatar David Spencer

slacknetsetup: Added new Slackware network setup.

parent 80efa360
......@@ -21,3 +21,10 @@ Patched for Slackware-current, to prevent fakeroot from locking up.
See this link:
* https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=883780
## slacknetsetup (rlw)
Builds a package for Robby's new network setup scripts, built from his
git repo.
* https://git.rlworkman.net/slacknetsetup/
Builds a package for Robby's new network setup scripts, built from his
git repo.
To build a specific branch:
BRANCH=tadgy-ipv6 ./slacknetsetup.SlackBuild
#!/bin/sh
# Handle the incoming configuration files:
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...
}
config etc/rc.d/rc.inet1.new
config etc/rc.d/rc.inet1.conf.new
# HOW TO EDIT THIS FILE:
# The "handy ruler" below makes it easier to edit a package description.
# Line up the first '|' above the ':' following the base package name, and
# the '|' on the right side marks the last column you can put a character in.
# You must make exactly 11 lines for the formatting to be correct. It's also
# customary to leave one space after the ':' except on otherwise blank lines.
|-----handy-ruler------------------------------------------------------|
slacknetsetup: slacknetsetup (Slackware network setup)
slacknetsetup:
slacknetsetup: Greetings, Slackers!
slacknetsetup:
slacknetsetup: Let's look into migrating Slackware's net config to use iproute2!
slacknetsetup:
slacknetsetup: https://git.rlworkman.net/slacknetsetup/
slacknetsetup:
slacknetsetup:
slacknetsetup:
slacknetsetup:
#!/bin/sh
# Slackware build script for slacknetsetup
set -x
PKGNAM=slacknetsetup
ARCH=noarch
BUILD=${BUILD:-1}
TAG=${TAG:-_uu}
CWD=$(pwd)
TMP=${TMP:-/tmp}
PKG=$TMP/package-$PKGNAM
OUTPUT=${OUTPUT:-/tmp}
BRANCH=${BRANCH:-master}
if [ -d $PKGNAM ]; then
cd $PKGNAM
git checkout $BRANCH
git pull --ff-only
else
git clone -b $BRANCH git://git.rlworkman.net/slacknetsetup
cd $PKGNAM
fi
VERSION=$(git rev-parse --short HEAD)
# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
# the name of the created package would be, and then exit. This information
# could be useful to other scripts.
if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
echo "$PKGNAM-$VERSION-$ARCH-$BUILD.txz"
exit 0
fi
set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
mkdir -p $PKG/etc/rc.d
( cd $PKG/etc/rc.d
for file in rc.inet1.conf rc.inet1 ; do
cp -a $CWD/$PKGNAM/$file ${file}.new
done
chown root:root *
chmod 755 rc.inet1.new
chmod 600 rc.inet1.conf.new
)
mkdir -p $PKG/sbin
cp -a netconfig $PKG/sbin/netconfig
chown root:root $PKG/sbin/netconfig
chmod 755 $PKG/sbin/netconfig
mkdir -p $PKG/usr/man/man{5,8}
cat manpages/rc.inet1.conf.5 | gzip -9c > $PKG/usr/man/man5/rc.inet1.conf.5.gz
cat manpages/rc.inet1.8 | gzip -9c > $PKG/usr/man/man8/rc.inet1.8.gz
mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION
cp -a README README.IPv6 $PKG/usr/doc/$PKGNAM-$VERSION
cat $CWD/$PKGNAM.SlackBuild > $PKG/usr/doc/$PKGNAM-$VERSION/$PKGNAM.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/$PKGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment