[debian-knoppix] Small patch for knoppix-autoconfig
Hi all,
know that I have finally found my way to the right place to put this
I'll repeat it for one last time.
The issue this "patch" addresses is that if you use the cheatcode
"myconf=scan" but there is no config to be found, the system will try
(and fail) to mount /dev/ with AES256 encryption and will ask the user
what to do. This is especially annoying if you are using splash.
The reason this is happening is happening is that no test is done that
findfile has actually found a config if the user puts in conf as
auto|scan|find. The simple patch is to check after findfile whether or
not it has a value and if not to record that in FOUND_CONFIG.
The original code was:
MYCONFDIR="$(findfile knoppix.sh)"
MYCONFDEVICE="${MYCONFDIR##/mnt/}"
MYCONFDEVICE="/dev/${MYCONFDEVICE%%/*}"
MYCONFMOUNTPOINT="/mnt/${MYCONFDEVICE##/dev/}"
MYCONFDIR="${MYCONFMOUNTPOINT}"
and this is simply changed to:
MYCONFDIR="$(findfile knoppix.sh)"
# check whether findfile found a file
if [ -n "$MYCONFDIR" ]; then
MYCONFDEVICE="${MYCONFDIR##/mnt/}"
MYCONFDEVICE="/dev/${MYCONFDEVICE%%/*}"
MYCONFMOUNTPOINT="/mnt/${MYCONFDEVICE##/dev/}"
MYCONFDIR="${MYCONFMOUNTPOINT}"
else
# if we didn't find a file set the FOUND_CONFIG so we don't try to mount
nothing
FOUND_CONFIG="none"
fi
I hope this is ok,
Niall Walsh
_______________________________________________
debian-knoppix mailing list
debian-knoppix@linuxtag.org
http://mailman.linuxtag.org/mailman/listinfo/debian-knoppix
Reply to: