summaryrefslogtreecommitdiffstats
path: root/source/n/network-scripts/network-scripts.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'source/n/network-scripts/network-scripts.SlackBuild')
-rwxr-xr-xsource/n/network-scripts/network-scripts.SlackBuild42
1 files changed, 38 insertions, 4 deletions
diff --git a/source/n/network-scripts/network-scripts.SlackBuild b/source/n/network-scripts/network-scripts.SlackBuild
index ea4bad779..80927a11a 100755
--- a/source/n/network-scripts/network-scripts.SlackBuild
+++ b/source/n/network-scripts/network-scripts.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/bash
-# Copyright 2006, 2007, 2008, 2009, 2010, 2012, 2013, 2015, 2017, 2018, 2021 Patrick J. Volkerding, Sebeka, MN, USA
+# Copyright 2006, 2007, 2008, 2009, 2010, 2012, 2013, 2015, 2017, 2018, 2021, 2022, 2023 Patrick J. Volkerding, Sebeka, MN, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -23,9 +23,9 @@
cd $(dirname $0) ; CWD=$(pwd)
PKGNAM=network-scripts
-VERSION=${VERSION:-15.0}
+VERSION=${VERSION:-15.1}
ARCH=noarch
-BUILD=${BUILD:-17}
+BUILD=${BUILD:-1}
# 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
@@ -68,6 +68,7 @@ chmod 755 $PKG/var/log/setup/setup.netconfig
mkdir -p $PKG/usr/man/man{5,8}
cat $CWD/manpages/rc.inet1.conf.5 | gzip -9c > $PKG/usr/man/man5/rc.inet1.conf.5.gz
cat $CWD/manpages/rc.inet1.8 | gzip -9c > $PKG/usr/man/man8/rc.inet1.8.gz
+cat $CWD/manpages/netconfig.8 | gzip -9c > $PKG/usr/man/man8/netconfig.8.gz
# Add default module configs for bonding and ipv6
mkdir -p $PKG/lib/modprobe.d/
@@ -95,7 +96,40 @@ cat $CWD/slack-desc > $PKG/install/slack-desc
( cd $PKG
cat $CWD/0001-netconfig-turn-off-rc.networkmanager-if-networkmanager-is-not-selected.patch | patch -p1 --verbose || exit 1
rm -f sbin/netconfig.orig
-)
+) || exit 1
+
+# Patch netconfig to add hostname-labeled loopback entries when DHCP
+# is selected:
+( cd $PKG
+ cat $CWD/0002-add-hostname-loopback-entries-in-etc-hosts-for-dhcp.patch | patch -p1 --verbose || exit 1
+ rm -f sbin/netconfig.orig
+) || exit 1
+
+# Temporarily rename these files so that we can patch them:
+mv $PKG/etc/rc.d/rc.inet1.new $PKG/etc/rc.d/rc.inet1
+mv $PKG/etc/rc.d/rc.inet1.conf.new $PKG/etc/rc.d/rc.inet1.conf
+
+# Re-add support for the DHCP_IPADDR parameter from rc.inet1.conf:
+( cd $PKG/etc/rc.d
+ cat $CWD/0003-76218fa6e7c097c875af2a29cc7670995bef2ae4.patch | patch -p1 --verbose || exit 1
+ rm -f etc/rc.d/rc.inet1.orig
+) || exit 1
+
+# Expand the help text for DHCP_IPADDR in rc.inet1.conf:
+( cd $PKG/etc/rc.d
+ cat $CWD/0004-8f43a741a36e59b8a9560ff2c4f3e5da2b8dd72b.patch | patch -p1 --verbose || exit 1
+ rm -f etc/rc.d/rc.inet1.conf.orig
+) || exit 1
+
+# Add support for a DHCP_OPTS parameter:
+( cd $PKG/etc/rc.d
+ cat $CWD/0005-5925f2bcc500f5198b5c00ab4e635a59bef7a413.patch | patch -p1 --verbose || exit 1
+ rm -f etc/rc.d/rc.inet1.orig
+) || exit 1
+
+# Rename the files back to .new:
+mv $PKG/etc/rc.d/rc.inet1 $PKG/etc/rc.d/rc.inet1.new
+mv $PKG/etc/rc.d/rc.inet1.conf $PKG/etc/rc.d/rc.inet1.conf.new
cd $PKG
/sbin/makepkg -l y -c n $TMP/${PKGNAM}-$VERSION-$ARCH-$BUILD.txz