4 231
modifications
Ligne 551 : | Ligne 551 : | ||
chmod -R 700 ${prefix}/root | chmod -R 700 ${prefix}/root | ||
fi | fi | ||
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=\"$ | 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=\"$ | 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=\"$ | 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> | ||