diff --git a/setup.pl b/setup.pl index 524c6216e..d7b793d52 100755 --- a/setup.pl +++ b/setup.pl @@ -132,9 +132,9 @@ if ($upgrading) { # Get current bootscript name if (-r "$config_directory/bootscript-name") { open(BOOTVAR, "$config_directory/bootscript-name"); - chop($bootscript = ); + chop($newbootscript = ); close(BOOTVAR); - $bootscript ||= ($ENV{'bootscript'} || "webmin"); + $bootscript = $newbootscript if ($newbootscript); } # Force creation if non-existant diff --git a/setup.sh b/setup.sh index 8a50e1270..d7ff5b3a9 100755 --- a/setup.sh +++ b/setup.sh @@ -159,9 +159,9 @@ if [ "$upgrading" = 1 ]; then # Get current bootscript if [ -r "$config_dir/bootscript-name" ]; then - bootscript=`cat $config_dir/bootscript-name` - if [ "$bootscript" = "" ]; then - bootscript="webmin" + newbootscript=`cat $config_dir/bootscript-name` + if [ "$newbootscript" != "" ]; then + bootscript="$newbootscript" fi fi