Commit fce70bca authored by Rafael Monnerat's avatar Rafael Monnerat

Improve keys setup.

parent 9c994df9
...@@ -8,11 +8,16 @@ if [ -z "$COMPUTERNAME" ]; then ...@@ -8,11 +8,16 @@ if [ -z "$COMPUTERNAME" ]; then
exit 1 exit 1
fi fi
if [ ! -f /etc/slapos-aptget-flag ]; then if [ -z "$SLAPPKGKEY" ]; then
wget -O- "http://download.opensuse.org/repositories/home:/VIFIBnexedi/Debian_7.0/Release.key" | apt-key add - SLAPPKGKEY=slapos-update-v0-iePo8Patho4aejai2reew1cai7exeibiepa8winideefar3aiBoh8ohpaingieTh
gpg --keyserver subkeys.pgp.net --recv-keys 1A716324 fi
gpg --export 1A716324 | apt-key add -
touch /etc/slapos-aptget-flag if [ ! -f /etc/apt/trusted.gpg.d/slapos.openbuildservice.gpg ]; then
wget -O /etc/apt/trusted.gpg.d/slapos.openbuildservice.gpg "http://download.opensuse.org/repositories/home:/VIFIBnexedi/Debian_7.0/Release.gpg"
fi
if [ ! -f /etc/apt/trusted.gpg.d/git.erp5.org.gpg ]; then
wget -O /etc/apt/trusted.gpg.d/git.erp5.org.gpg "http://git.erp5.org/gitweb/slapos.package.git/blob_plain/HEAD:/debian-preseed/git.erp5.org.key"
fi fi
if [ ! -f /usr/local/bin/slappkg-update ]; then if [ ! -f /usr/local/bin/slappkg-update ]; then
...@@ -20,7 +25,7 @@ if [ ! -f /usr/local/bin/slappkg-update ]; then ...@@ -20,7 +25,7 @@ if [ ! -f /usr/local/bin/slappkg-update ]; then
easy_install -U slapos.package easy_install -U slapos.package
fi fi
slappkg-conf --key=slapos-update-v0-iePo8Patho4aejai2reew1cai7exeibiepa8winideefar3aiBoh8ohpaingieTh --slapos-configuration=/etc/opt/update.cfg slappkg-conf --key=$SLAPPKGKEY --slapos-configuration=/etc/opt/update.cfg
slappkg-update --slapos-configuration=/etc/opt/update.cfg slappkg-update --slapos-configuration=/etc/opt/update.cfg
...@@ -28,7 +33,8 @@ slappkg-update --slapos-configuration=/etc/opt/update.cfg ...@@ -28,7 +33,8 @@ slappkg-update --slapos-configuration=/etc/opt/update.cfg
apt-get install -y firmware-realtek apt-get install -y firmware-realtek
if [ ! -f /etc/re6stnet/re6stnet.conf ]; then if [ ! -f /etc/re6stnet/re6stnet.conf ]; then
slapos-re6st-setup $COMPUTERNAME
re6st-conf -d /etc/re6stnet --registry "http://re6stnet.nexedi.com" -r title $COMPUTERNAME --anonymous
/etc/init.d/re6stnet restart /etc/init.d/re6stnet restart
...@@ -46,24 +52,10 @@ if [ ! -f /etc/re6stnet/re6stnet.conf ]; then ...@@ -46,24 +52,10 @@ if [ ! -f /etc/re6stnet/re6stnet.conf ]; then
echo "########################################################################" echo "########################################################################"
fi fi
set +e
IPV6WAITTIME=5
# Wait for native ipv6 connection to be ready
i=0
ping6 -c 2 ipv6.google.com
while [ $? != 0 ] && [ $i < $IPV6WAITTIME ]
do
let i++
sleep 1
ping6 -c 2 ipv6.google.com
done
set -e
if [ ! -f /etc/opt/slapos/slapos.cfg ]; then if [ ! -f /etc/opt/slapos/slapos.cfg ]; then
slapos node register $COMPUTERNAME --partition-number 20 --ipv6-interface lo --interface-name eth0 slapos node register $COMPUTERNAME --partition-number 20 --ipv6-interface lo --interface-name eth0
rm /etc/opt/update.cfg rm /etc/opt/update.cfg
slappkg-conf --key=slapos-update-v0-iePo8Patho4aejai2reew1cai7exeibiepa8winideefar3aiBoh8ohpaingieTh --slapos-configuration=/etc/opt/update.cfg slappkg-conf --key=$SLAPPKGKEY --slapos-configuration=/etc/opt/update.cfg
fi fi
if [ ! -f /etc/opt/slapos/slapos.cfg ]; then if [ ! -f /etc/opt/slapos/slapos.cfg ]; then
...@@ -71,6 +63,8 @@ if [ ! -f /etc/opt/slapos/slapos.cfg ]; then ...@@ -71,6 +63,8 @@ if [ ! -f /etc/opt/slapos/slapos.cfg ]; then
exit 1 exit 1
fi fi
slapos node boot
# slapos-tweak should be merged with slapos.package # slapos-tweak should be merged with slapos.package
slapos-tweak slapos-tweak
...@@ -82,4 +76,3 @@ MAILTO="" ...@@ -82,4 +76,3 @@ MAILTO=""
@reboot root /usr/sbin/slapos-tweak >> /opt/slapos/log/slapos-tweak.log 2>&1 @reboot root /usr/sbin/slapos-tweak >> /opt/slapos/log/slapos-tweak.log 2>&1
EOF EOF
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment