From c2ec0ce8af0b2cf1887f60e739f93163c823772f Mon Sep 17 00:00:00 2001 From: Robby Workman Date: Mon, 12 Aug 2024 02:09:02 -0500 Subject: network/openntpd: Fix ownership/perms on /var/empty dir Moving the creation/chmod of /var/empty/openntpd to after the build phase is completed ensures that the ownership and/or permissions aren't modified by 'make install' This commit also includes minor tweaks to rc.openntpd Signed-off-by: Robby Workman Signed-off-by: Willy Sudiarto Raharjo --- network/openntpd/openntpd.SlackBuild | 10 +++++----- network/openntpd/rc.openntpd | 5 +---- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/network/openntpd/openntpd.SlackBuild b/network/openntpd/openntpd.SlackBuild index 16e2296ec5f8..4bdb8a95dd72 100644 --- a/network/openntpd/openntpd.SlackBuild +++ b/network/openntpd/openntpd.SlackBuild @@ -78,11 +78,6 @@ echo "You must have a user and group called '_ntp' to use this package. E.g.: egrep -q -e '^_ntp:' /etc/passwd egrep -q -e '^_ntp:' /etc/group -# Create the _ntp user's home, and the daemon's chroot directory -mkdir -p $PKG/var/empty/openntpd -chown root:root $PKG/var/empty/openntpd -chmod 0755 $PKG/var/empty/openntpd - rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT cd $TMP @@ -123,6 +118,11 @@ make install DESTDIR=$PKG # Remove unnecessary directories created by `make install` rmdir $PKG/var/run/ +# Create the _ntp user's home, and the daemon's chroot directory +mkdir -p $PKG/var/empty/openntpd +chown root:root $PKG/var/empty/openntpd +chmod 0755 $PKG/var/empty/openntpd + find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true diff --git a/network/openntpd/rc.openntpd b/network/openntpd/rc.openntpd index 55d082b0fb14..54140131707d 100644 --- a/network/openntpd/rc.openntpd +++ b/network/openntpd/rc.openntpd @@ -1,9 +1,6 @@ #!/bin/sh -# Start/stop/restart the network time protocol daemon - -# Written for Slackware Linux by Robby Workman -# (by modifying one of Pat's scripts) +# Start/stop/restart openntpd # Add -s to the command to set the time at startup -- cgit v1.2.3