Change the hardcoded paths in initscripts to dynamically generated ones. The
real executable path $bindir can be constructed using $prefix and $exec_prefix
variables, therefore it's necessary to define also these two.
The patch includes removal of old initscripts from git - they are generated
from .in file now.
I did not run autoreconf, I think the generated junk is being removed from git
soon.
Signed-off-by: Jan Safranek <jsafrane@redhat.com>
Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com>
src/tools/Makefile
src/pam/Makefile
scripts/Makefile
+ scripts/init.d/cgconfig
+ scripts/init.d/cgred
samples/Makefile
include/Makefile
doc/Makefile
-EXTRA_DIST = init.d/cgconfig init.d/cgred
+EXTRA_DIST = init.d/cgconfig.in init.d/cgred.in
# Description: This script allows us to create a default configuration
### END INIT INFO
-PATH=/bin:/usr/bin:/sbin:/usr/sbin:.
+# get correct location of binaries from configure
+prefix=@prefix@;exec_prefix=@exec_prefix@;sbindir=@sbindir@
+CGCONFIGPARSER_BIN=$sbindir/cgconfigparser
MOUNTS_FILE=/proc/mounts
PROC_CGROUPS_FILE=/proc/cgroups
CGROUP_FS=cgroup
if [ $? -eq 0 ]
then
- cgconfigparser -l $CONFIG_FILE
+ $CGCONFIGPARSER_BIN -l $CONFIG_FILE
retval=$?
if [ $retval -ne 0 ]
then
# cgroups to classify processes
### END INIT INFO
-prefix=/usr
-exec_prefix=/usr
-bindir=/bin
-
-CGRED_BIN=${exec_prefix}/${bindir}/cgrulesengd
+prefix=@prefix@;exec_prefix=@exec_prefix@;bindir=@bindir@
+CGRED_BIN=$bindir/cgrulesengd
# Sanity checks
[ -x $CGRED_BIN ] || exit 1