mirror of
https://github.com/webmin/webmin.git
synced 2026-02-03 06:03:28 +00:00
Refactor the way bootscript is override to reduce duplication
This commit is contained in:
4
setup.pl
4
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 = <BOOTVAR>);
|
||||
chop($newbootscript = <BOOTVAR>);
|
||||
close(BOOTVAR);
|
||||
$bootscript ||= ($ENV{'bootscript'} || "webmin");
|
||||
$bootscript = $newbootscript if ($newbootscript);
|
||||
}
|
||||
|
||||
# Force creation if non-existant
|
||||
|
||||
6
setup.sh
6
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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user