Don't install ssh server on mesh images

This commit is contained in:
Bob Mottram 2016-08-11 13:56:25 +01:00
parent a51e5fa39e
commit 7571380f51
2 changed files with 4 additions and 13 deletions

View File

@ -843,7 +843,10 @@ if [ -n "$CUSTOM_SETUP" ]; then
chroot "$rootdir" gdebi -n /tmp/"$(basename $CUSTOM_SETUP)"
fi
chroot "$rootdir" apt-get install -y sudo git dialog toilet build-essential openssh-server
if [[ $VARIANT != "meshclient" && $VARIANT != "meshusb" && $VARIANT != "mesh" ]]; then
chroot "$rootdir" apt-get install -y openssh-server
fi
chroot "$rootdir" apt-get install -y sudo git dialog toilet build-essential
chroot "$rootdir" apt-get install -y avahi-daemon avahi-utils avahi-discover avahi-autoipd
chroot "$rootdir" apt-get install -y iptables dnsutils net-tools network-manager iputils-ping
chroot "$rootdir" apt-get install -y libnss-mdns libnss-myhostname libnss-gw-name nano man ntp

View File

@ -113,17 +113,6 @@ function change_avahi_name {
echo $"avahi name changed to P${PEER_ID}.local" >> $INSTALL_LOG
}
function regenerate_ssh_host_keys {
echo $"Regenerating ssh host keys" >> $INSTALL_LOG
rm -f /etc/ssh/ssh_host_*
dpkg-reconfigure openssh-server
echo $'ssh host keys regenerated' >> $INSTALL_LOG
# remove small moduli
awk '$5 > 2000' /etc/ssh/moduli > ~/moduli
mv ~/moduli /etc/ssh/moduli
echo $'ssh small moduli removed' >> $INSTALL_LOG
}
function configure_zeronet {
sed -i "s|ExecStart=.*|ExecStart=/usr/bin/python zeronet.py --ip_external P${PEER_ID}.local --trackers_file $MESH_INSTALL_DIR/zeronet/bootstrap|g" /etc/systemd/system/zeronet.service
echo $"zeronet daemon updated to P${PEER_ID}.local" >> $INSTALL_LOG
@ -805,7 +794,6 @@ if [ -f $MESH_INSTALL_SETUP ]; then
create_ram_disk 1
setup_amnesic_data
change_avahi_name
regenerate_ssh_host_keys
if [ $ENABLE_ZERONET ]; then
configure_zeronet_blog
configure_zeronet_mail