system/fcron: Update script.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
parent
02c7eabf53
commit
8822594583
|
@ -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}
|
||||
|
|
Loading…
Reference in New Issue