Menuconfig patch allows ~/file & $HOME/file Alternate filenames

William E. Roadcap (roadcapw@cfw.com)
Thu, 20 Jun 1996 09:38:14 -0400 (EDT)


This patch fulfills a request to allow one to specify Menuconfig
alternate config filenames with HOME directory translation.

As it uses the BASH eval directive to translate the filename, it could be
possible to use other shell globbing characters with unpredicted results.
This might be a bad thing as it could crash Menuconfig with certain user
input. Can you guys test this and give some feedback please.

This has been CC'd to Linus for inclusion in 2.0.1
Thanks all...
__
William E. Roadcap mailto:roadcapw@cfw.com
TITUS Software ftp://titus.cfw.com/pub
Waynesboro, Va (USA) http://www.cfw.com/~roadcapw
.........................................................................

--- linux/scripts/Menuconfig-2.0.0 Thu Jun 20 09:26:05 1996
+++ linux/scripts/Menuconfig Thu Jun 20 09:23:58 1996
@@ -733,7 +733,7 @@
# Create a menu item to load an alternate configuration file.
#
g_alt_config () {
- echo -n "get_alt_config 'Load an Alternate Configuration File' "\
+ echo -n "get_alt_config 'Load an Alternate Configuration File' "\
>>MCmenu
}

@@ -759,9 +759,9 @@

[ "_" = "_$ALT_CONFIG" ] && break

- if [ -r "$ALT_CONFIG" ]
+ if eval [ -r "$ALT_CONFIG" ]
then
- load_config_file "$ALT_CONFIG"
+ eval load_config_file "$ALT_CONFIG"
break
else
echo -ne "\007"
@@ -796,7 +796,7 @@
# Create a menu item to store an alternate config file.
#
s_alt_config () {
- echo -n "save_alt_config 'Store an Alternate Configuration File' "\
+ echo -n "save_alt_config 'Save Configuration to an Alternate File' "\
>>MCmenu
}

@@ -819,9 +819,9 @@

[ "_" = "_$ALT_CONFIG" ] && break

- if touch $ALT_CONFIG 2>/dev/null
+ if eval touch $ALT_CONFIG 2>/dev/null
then
- save_configuration $ALT_CONFIG
+ eval save_configuration $ALT_CONFIG
load_functions ## RELOAD
break
else
@@ -844,7 +844,7 @@
leave this blank.
EOM
$DIALOG --backtitle "$backtitle"\
- --title "Store Alternate Configuration"\
+ --title "Save Alternate Configuration"\
--textbox help.out $ROWS $COLS
fi
done