[Ovirt-devel] [PATCH] * ovirt-host-creator/common-post.ks: Add explicit PATH= setting, ...


Mon May 5 19:07:53 UTC 2008


so it's obviously ok to remove all absolute path prefixes.
* wui-appliance/common-post.ks: Likewise.

Signed-off-by: Jim Meyering <meyering at redhat.com>
---
 ovirt-host-creator/common-post.ks |    6 ++++--
 wui-appliance/common-post.ks      |    9 ++++++---
 wui-appliance/wui-devel-x86_64.ks |    4 ++--
 3 files changed, 12 insertions(+), 7 deletions(-)

diff --git a/ovirt-host-creator/common-post.ks b/ovirt-host-creator/common-post.ks
index 64fe0ee..17291b4 100644
--- a/ovirt-host-creator/common-post.ks
+++ b/ovirt-host-creator/common-post.ks
@@ -1,4 +1,6 @@
 echo "Starting Kickstart Post"
+PATH=/sbin:/usr/sbin:/bin:/usr/bin
+export PATH

 echo "Setting up Networking"
 cat > /etc/sysconfig/iptables << \EOF
@@ -183,7 +185,7 @@ esac
 EOF

 chmod +x /etc/init.d/ovirt
-/sbin/chkconfig ovirt on
+chkconfig ovirt on

 echo "Setting up libvirt interfaces"
 # make libvirtd listen on the external interfaces
@@ -278,7 +280,7 @@ echo "Re-creating cracklib dicts"
 # checking on the ovirt host
 # unfortunately we can't create an empty cracklib dict, so we create it
 # with a single entry "1"
-echo 1 | /usr/sbin/packer >& /dev/null
+echo 1 | packer >& /dev/null

 echo "Forcing C locale"
 # force logins (via ssh, etc) to use C locale, since we remove locales
diff --git a/wui-appliance/common-post.ks b/wui-appliance/common-post.ks
index 3bd6b4d..3dee5bb 100644
--- a/wui-appliance/common-post.ks
+++ b/wui-appliance/common-post.ks
@@ -1,3 +1,6 @@
+PATH=/sbin:/usr/sbin:/bin:/usr/bin
+export PATH
+
 # pretty login screen..
 g=$(printf '\33[1m\33[32m')    # similar to g=$(tput bold; tput setaf 2)
 n=$(printf '\33[m')            # similar to n=$(tput sgr0)
@@ -34,7 +37,7 @@ cat > /etc/init.d/ovirt-wui-first-run << \EOF
 start() {
 	echo -n "Starting ovirt-wui-first-run: "

-	/usr/bin/ovirt-wui-install > /var/log/ovirt-wui-first-run.log 2>&1
+	ovirt-wui-install > /var/log/ovirt-wui-first-run.log 2>&1

 	RETVAL=$?
 	if [ $RETVAL -eq 0 ]; then
@@ -54,10 +57,10 @@ case "$1" in
         exit 2
 esac

-/sbin/chkconfig ovirt-wui-first-run off
+chkconfig ovirt-wui-first-run off
 EOF
 chmod +x /etc/init.d/ovirt-wui-first-run
-/sbin/chkconfig ovirt-wui-first-run on
+chkconfig ovirt-wui-first-run on

 cat > /etc/yum.repos.d/ovirt-management.repo << \EOF
 [ovirt-management]
diff --git a/wui-appliance/wui-devel-x86_64.ks b/wui-appliance/wui-devel-x86_64.ks
index f28ed27..67172ba 100644
--- a/wui-appliance/wui-devel-x86_64.ks
+++ b/wui-appliance/wui-devel-x86_64.ks
@@ -165,7 +165,7 @@ esac
 chkconfig ovirt-wui-dev-first-run off
 EOF
 chmod +x $first_run_file
-/sbin/chkconfig ovirt-wui-dev-first-run on
+chkconfig ovirt-wui-dev-first-run on

 cat > /etc/init.d/ovirt-wui-dev << \EOF
 #!/bin/bash
@@ -253,7 +253,7 @@ case "$1" in
 esac
 EOF
 chmod +x /etc/init.d/ovirt-wui-dev
-/sbin/chkconfig ovirt-wui-dev on
+chkconfig ovirt-wui-dev on

 # get the PXE boot image; this can take a while
 PXE_URL=http://ovirt.org/download
-- 
1.5.5.1.126.g02179




More information about the ovirt-devel mailing list