aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
author Eric Hameleers <alien@slackware.com>2023-09-17 22:05:04 +0200
committer Eric Hameleers <alien@slackware.com>2023-09-17 22:05:04 +0200
commitbc9b441a6d0753d43e4a428ea7903a804105b5b3 (patch)
treead59583623a8bfe9edaea584023582a67b8cd950
parentd2ff08610bfbf965d5b0b2aab31eeb0746053e65 (diff)
downloadliveslak-bc9b441a6d0753d43e4a428ea7903a804105b5b3.tar.gz
liveslak-bc9b441a6d0753d43e4a428ea7903a804105b5b3.tar.xz
Fix harmless warning about missing dhcpcd account during PXE boot
-rwxr-xr-xmake_slackware_live.sh6
1 files changed, 6 insertions, 0 deletions
diff --git a/make_slackware_live.sh b/make_slackware_live.sh
index e84e9df..fe2181f 100755
--- a/make_slackware_live.sh
+++ b/make_slackware_live.sh
@@ -3410,6 +3410,12 @@ tar -C ${LIVE_ROOTDIR}/boot/initrd-tree/ -xf ${DHCPD_PKG} \
var/lib/dhcpcd lib/dhcpcd sbin/dhcpcd usr/lib${DIRSUFFIX}/dhcpcd \
etc/dhcpcd.conf.new
mv ${LIVE_ROOTDIR}/boot/initrd-tree/etc/dhcpcd.conf{.new,}
+# Create the dhcpcd account because we added the package to the initrd:
+if ! grep -q dhcpcd ${LIVE_ROOTDIR}/boot/initrd-tree/etc/passwd; then
+ echo "dhcpcd:x:68:68:User for dhcpcd:/var/lib/dhcpcd:/bin/false" >> ${LIVE_ROOTDIR}/boot/initrd-tree/etc/passwd
+ echo "dhcpcd:x:68:" >> ${LIVE_ROOTDIR}/boot/initrd-tree/etc/group
+fi
+
# Add getfattr to read extended attributes (even if we won't need it):
ATTR_PKG=$(find ${DEF_SL_PKGROOT}/../ -name "attr-*.t?z" |head -1)
tar --wildcards -C ${LIVE_ROOTDIR}/boot/initrd-tree/ -xf ${ATTR_PKG} \