integrate-distro.sh: Support for running without ytools-run installed

Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
Jan Lindemann 2016-11-17 17:56:42 +00:00
commit 12acf93505

View file

@ -1,7 +1,5 @@
#!/bin/sh
. ini-tools.sh
# -- defaults
# install_dev=/dev/sdb
arch=`uname -m`
@ -450,7 +448,8 @@ usage()
get_opts()
{
eval set -- `getopt -o 'hd:n:a:p:k:u:w:s:r:fc:' -l config-file:,non-interactive -- "$@"`
local p
eval set -- `getopt -o 'hd:n:a:p:k:u:w:s:r:fc:P:' -l config-file:,non-interactive -- "$@"`
while [ "$1" != -- ] ; do
case "$1" in
-h)
@ -503,6 +502,13 @@ get_opts()
-f)
o_force=1
;;
-P)
export PATH="$2"
for p in /sbin /usr/sbin; do
echo $PATH | grep -q "\(^\|:\)$p\(:\|$\)" || PATH=$PATH:$p
done
shift
;;
*)
usage 1
;;
@ -1380,6 +1386,8 @@ host_files=""
declare -A hooks
get_opts "$@"
. ini-tools.sh
case $arch in
i386|i586|i686)
case `uname -m` in
@ -1433,7 +1441,7 @@ if [ `whoami` != root -o "$l32" ]; then
opts=""
[ "$config_file" ] && opts="$opts --config-file $config_file"
#debug="/bin/bash -x"
ssh -l root localhost $l32 $debug $exe $@ -p $root_password_file -u $scm_user -w $cwd $opt_ssh_auth_sock $opts
ssh -l root localhost $l32 $debug $exe $@ -p $root_password_file -u $scm_user -w $cwd $opt_ssh_auth_sock -P "$PATH" $opts
exit $?
fi