From 882259458336617eb9a3ad2e38dfa2cadaeeb423 Mon Sep 17 00:00:00 2001 From: Richard Narron Date: Fri, 1 Mar 2024 21:29:39 +0700 Subject: system/fcron: Update script. Signed-off-by: Willy Sudiarto Raharjo --- system/fcron/fcron.SlackBuild | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) (limited to 'system') diff --git a/system/fcron/fcron.SlackBuild b/system/fcron/fcron.SlackBuild index 373b775f12..f1df6e9184 100644 --- a/system/fcron/fcron.SlackBuild +++ b/system/fcron/fcron.SlackBuild @@ -26,7 +26,7 @@ cd $(dirname $0) ; CWD=$(pwd) PRGNAM=fcron VERSION=${VERSION:-3.3.1} -BUILD=${BUILD:-1} +BUILD=${BUILD:-2} TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} @@ -34,20 +34,6 @@ PKGTYPE=${PKGTYPE:-tgz} FCRON_USER=${FCRON_USER:-fcron} FCRON_GROUP=${FCRON_GROUP:-fcron} -if ! getent group $FCRON_GROUP >/dev/null; then - echo "Error, the group $FCRON_GROUP does not exist." - echo "Create the group and user like this:" - echo " groupadd -g 289 $FCRON_GROUP" - echo " useradd -u 289 -g $FCRON_GROUP -d /var/spool/fcron -M -s /bin/false $FCRON_USER" - exit 1 -fi -if ! getent passwd $FCRON_USER >/dev/null; then - echo "Error, the userid $FCRON_USER does not exist." - echo "Create the user like this:" - echo " useradd -u 289 -g $FCRON_GROUP -d /var/spool/fcron -M -s /bin/false $FCRON_USER" - exit 1 -fi - if [ -z "$ARCH" ]; then case "$( uname -m )" in i?86) ARCH=i586 ;; @@ -64,6 +50,21 @@ if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then exit 0 fi +# Make sure the fcron default user and group exist +if ! getent group $FCRON_GROUP >/dev/null; then + echo "Error, the group $FCRON_GROUP does not exist." + echo "Create the group and user like this:" + echo " groupadd -g 289 $FCRON_GROUP" + echo " useradd -u 289 -g $FCRON_GROUP -d /var/spool/fcron -M -s /bin/false $FCRON_USER" + exit 1 +fi +if ! getent passwd $FCRON_USER >/dev/null; then + echo "Error, the userid $FCRON_USER does not exist." + echo "Create the user like this:" + echo " useradd -u 289 -g $FCRON_GROUP -d /var/spool/fcron -M -s /bin/false $FCRON_USER" + exit 1 +fi + TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} -- cgit v1.2.3