fix: X86_64-packages were downloaded with -a i686

Signed-off-by: Jan Lindemann <jan@jannet.de>
This commit is contained in:
Jan Lindemann 2013-04-07 21:40:07 +00:00 committed by Jan Lindemann
commit be42061c02

View file

@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/sh -x
# -- defaults
# install_dev=/dev/sdb
@ -244,13 +244,14 @@ usage()
-p file with root password
-a architecture
-c copy-source-dir
-u user (for source-code-management login)
"
[ "$1" ] && exit $1
}
get_opts()
{
set -- `getopt 'hd:n:a:p:c:' $*`
set -- `getopt 'hd:n:a:p:c:u:' $*`
while [ "$1" != -- ] ; do
case "$1" in
-h)
@ -276,6 +277,10 @@ get_opts()
copy_source_dir=$2
shift
;;
-u)
scm_user=$2
shift
;;
*)
usage 1
;;
@ -1000,6 +1005,7 @@ cmd_install()
chroot $root /usr/sbin/pam-config -a --ldap
echo "=== running jcs setup"
export CVSROOT=:ext:$scm_user@cvs.jannet.de:/home/jannet/arc/cvs
if [ "$SSH_AUTH_SOCK" ]; then
mkdir -m 700 -p `dirname $root/$SSH_AUTH_SOCK`
ln $SSH_AUTH_SOCK $root/$SSH_AUTH_SOCK
@ -1026,7 +1032,15 @@ get_opts "$@"
init_root_password_file
if [ `whoami` != root ]; then
case $arch in
i386|i586|i686)
l32=linux32;;
x86_64)
;;
esac
if [ `whoami` != root -o "$l32" ]; then
[ ! "$scm_user" ] && scm_user=`whoami`
exe=$0
[ ${exe:0:1} = / ] || {
exe=`/bin/pwd`/$exe
@ -1035,17 +1049,13 @@ if [ `whoami` != root ]; then
# preferring "ssh -l root localhost" over "sudo" to keep ssh-agent environment
#sudo -i $exe $@ -p $root_password_file
ssh -l root localhost $exe $@ -p $root_password_file
ssh -l root localhost $l32 $exe $@ -p $root_password_file -u $scm_user
exit $?
fi
case $arch in
i386,i586,i686)
linux32;;
x86_64)
setarch x86_64;;
esac
[ ! "$scm_user" ] && scm_user=`whoami`
name=$o_name-$arch
root=/srv/nfs/boot/distros/$name/ro