« L'hyperviseur Xen sous Debian Wheezy » : différence entre les versions

Aller à la navigation Aller à la recherche
Ligne 551 : Ligne 551 :
         chmod -R 700 ${prefix}/root
         chmod -R 700 ${prefix}/root
fi
fi
#dom0=`ifconfig eth0 | grep "inet addr" | cut -f 2 -d ":" | sed -e 's/^\([^ ]*\) .*$/\1/'`
 
dom0=""
for ip in `ifconfig | grep "inet addr" | cut -d ":" -f 2 | cut -d " " -f 1`; do
        if [ ! $ip = "127.0.0.1" ]; then
                dom0=$dom0$ip,
        fi
done
for ip in `ifconfig | grep -E "inet6 addr.*Global" | sed 's/^[ \t]*//;s/[ \t]*$//' | cut -d " " -f 3 | cut -d "/" -f 1`; do
        dom0=$dom0$ip,
done
trusted=`echo $dom0 | sed 's/^,*//;s/,*$//'`
 
dom0=`cat /etc/hostname`
dom0=`cat /etc/hostname`
if [ -f /etc/xen-tools/ssh-keys/domU-backup-rsa.pub ]; then
if [ -f /etc/xen-tools/ssh-keys/domU-backup-rsa.pub ]; then
         echo from=\"$dom0\" `cat /etc/xen-tools/ssh-keys/domU-backup-rsa.pub` >> ${prefix}/root/.ssh/authorized_keys
         echo from=\"$trusted\" `cat /etc/xen-tools/ssh-keys/domU-backup-rsa.pub` >> ${prefix}/root/.ssh/authorized_keys
fi
fi
if [ -f /etc/xen-tools/ssh-keys/domU-upgrade-rsa.pub ]; then
if [ -f /etc/xen-tools/ssh-keys/domU-upgrade-rsa.pub ]; then
         echo from=\"$dom0\" `cat /etc/xen-tools/ssh-keys/domU-upgrade-rsa.pub` >> ${prefix}/root/.ssh/authorized_keys
         echo from=\"$trusted\" `cat /etc/xen-tools/ssh-keys/domU-upgrade-rsa.pub` >> ${prefix}/root/.ssh/authorized_keys
fi
fi
if [ -f /root/.ssh/id_rsa.pub ]; then
if [ -f /root/.ssh/id_rsa.pub ]; then
         echo from=\"$dom0\"  `cat /root/.ssh/id_rsa.pub` >> ${prefix}/root/.ssh/authorized_keys
         echo from=\"$trusted\"  `cat /root/.ssh/id_rsa.pub` >> ${prefix}/root/.ssh/authorized_keys
fi
fi


Ligne 580 : Ligne 591 :
#
#
logMessage Script $0 finished
logMessage Script $0 finished
</pre>
</pre>


4 203

modifications

Menu de navigation