diff --git a/rpc.yppasswdd.env b/rpc.yppasswdd.env new file mode 100644 index 0000000..364e09e --- /dev/null +++ b/rpc.yppasswdd.env @@ -0,0 +1,16 @@ +#!/bin/bash + +if [ "$ETCDIR" ]; then + YPPASSWDD_ARGS="$YPPASSWDD_ARGS -D $ETCDIR" +fi + +if [ "$PASSWDFILE" ]; then + YPPASSWDD_ARGS="$YPPASSWDD_ARGS -p $PASSWDFILE" +fi + +if [ "$SHADOWFILE" ]; then + YPPASSWDD_ARGS="$YPPASSWDD_ARGS -s $SHADOWFILE" +fi + +exec /usr/sbin/rpc.yppasswdd -f $YPPASSWDD_ARGS + diff --git a/yppasswdd.service b/yppasswdd.service index ec92f54..1e3e402 100644 --- a/yppasswdd.service +++ b/yppasswdd.service @@ -5,7 +5,7 @@ After=syslog.target network.target rpcbind.service [Service] EnvironmentFile=-/etc/sysconfig/yppasswdd -ExecStart=/usr/sbin/rpc.yppasswdd -f $YPPASSWDD_ARGS +ExecStart=/usr/sbin/rpc.yppasswdd.env [Install] WantedBy=multi-user.target diff --git a/ypserv.spec b/ypserv.spec index 15e71b8..ff3401d 100644 --- a/ypserv.spec +++ b/ypserv.spec @@ -9,6 +9,7 @@ Source0: ftp://ftp.kernel.org/pub/linux/utils/net/NIS/ypserv-%{version}.tar.bz2 Source1: ypserv.service Source2: yppasswdd.service Source3: ypxfrd.service +Source4: rpc.yppasswdd.env Requires: gawk, make, portmap, bash >= 2.0 Requires(post): systemd-units @@ -110,6 +111,15 @@ cat >$RPM_BUILD_ROOT/etc/sysconfig/yppasswdd < - 2.26-7 - Fixed empty domain handling in ypinit script Resolves: #751427 +- Added a wrapper script to use all variables correctly in the unit file + Resolves: #755775 * Mon Oct 10 2011 Honza Horak - 2.26-6 - Made error messages in yppasswdd more accurate