lkml.org 
[lkml]   [1996]   [Jun]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectMenuconfig patch allows ~/file & $HOME/file Alternate filenames
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


\
 
 \ /
  Last update: 2005-03-22 13:37    [W:0.045 / U:0.908 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site