Remove auto-start regardless of how setup was started

This commit is contained in:
Jason Ertel
2020-08-28 09:10:35 -04:00
parent 4e3e83820f
commit 3877706f20
2 changed files with 12 additions and 9 deletions

View File

@@ -708,13 +708,16 @@ detect_os() {
disable_auto_start() { disable_auto_start() {
# Remove the automated setup script from crontab, if it exists if crontab -l | grep so-setup; then
logCmd "crontab -u $INSTALLUSERNAME -r" # Remove the automated setup script from crontab, if it exists
logCmd "crontab -u $INSTALLUSERNAME -r"
# Truncate last line of the bash profile fi
info "Removing auto-run of setup from bash profile"
sed -i '$ d' /home/$INSTALLUSERNAME/.bash_profile >> "$setup_log" 2>&1
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() { disable_misc_network_features() {

View File

@@ -415,11 +415,11 @@ if [[ "$setup_type" == 'iso' ]]; then
# Init networking so rest of install works # Init networking so rest of install works
set_hostname_iso set_hostname_iso
set_management_interface set_management_interface
#add_admin_user
disable_auto_start
fi fi
disable_auto_start
{ {
set_hostname; set_hostname;
set_version; set_version;