diff --git a/setup/so-functions b/setup/so-functions index d4ed890c0..afb7bd72b 100755 --- a/setup/so-functions +++ b/setup/so-functions @@ -708,13 +708,16 @@ detect_os() { disable_auto_start() { - # Remove the automated setup script from crontab, if it exists - logCmd "crontab -u $INSTALLUSERNAME -r" - - # Truncate last line of the bash profile - info "Removing auto-run of setup from bash profile" - sed -i '$ d' /home/$INSTALLUSERNAME/.bash_profile >> "$setup_log" 2>&1 + if crontab -l | grep so-setup; then + # Remove the automated setup script from crontab, if it exists + logCmd "crontab -u $INSTALLUSERNAME -r" + fi + if grep so-setup /home/$INSTALLUSERNAME/.bash_profile; then + # Truncate last line of the bash profile + info "Removing auto-run of setup from bash profile" + sed -i '$ d' /home/$INSTALLUSERNAME/.bash_profile >> "$setup_log" 2>&1 + fi } disable_misc_network_features() { diff --git a/setup/so-setup b/setup/so-setup index b1add6308..a3eff2aa6 100755 --- a/setup/so-setup +++ b/setup/so-setup @@ -415,11 +415,11 @@ if [[ "$setup_type" == 'iso' ]]; then # Init networking so rest of install works set_hostname_iso set_management_interface - - #add_admin_user - disable_auto_start fi +disable_auto_start + + { set_hostname; set_version;