#!/bin/bash set -e export LANG=C export LC_ALL=C working_dir="$(dirname "$0")" scripts_dir="${working_dir}/includes/" netscript_dir="${scripts_dir}/netscript/" RC=0 YELLOW="$(tput setaf 3)" NORMAL="$(tput op)" . /etc/grml/lsb-functions einfo "Executing grml-sipwise specific checks..." eindent install_sipwise_keyring() { if [ -f "${scripts_dir}/sipwise.gpg" ]; then einfo "Installing sipwise keyring to '/etc/apt/trusted.gpg.d/sipwise.gpg'..."; eend 0 cp "${scripts_dir}/sipwise.gpg" /etc/apt/trusted.gpg.d/sipwise.gpg else ewarn "Sipwise keyring '${scripts_dir}/sipwise.gpg' not found, continuing anyway." ; eend 0 fi } network_check() { if "${scripts_dir}/check-for-network" ; then einfo "Looks like we have working network, continuing..." ; eend 0 else if dialog --yes-label Yes --no-label Exit --yesno "It looks like you don't have a working network connection yet. Do you want to configure the network now?" 0 0 ; then if ! netcardconfig ; then ewarn "Failed to configure network, continuing anyway." ; eend 0 fi else ewarn "Cancelling as requested by user." ; eend 0 return 1 fi fi } report_ssh_password() { local rootpwd=$(grep -Eo '\