From bc9b441a6d0753d43e4a428ea7903a804105b5b3 Mon Sep 17 00:00:00 2001 From: Eric Hameleers Date: Sun, 17 Sep 2023 22:05:04 +0200 Subject: Fix harmless warning about missing dhcpcd account during PXE boot --- make_slackware_live.sh | 6 ++++++ 1 file changed, 6 insertions(+) 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} \ -- cgit v1.2.3