On Thu, 2017-01-05 at 17:18 -0800, Gayatri Kammela wrote:
- grep -q luv_storage /proc/cmdline
- if [ $? -eq 0 ]; then
+ grep -q 'luv_storage=none' /proc/cmdline
+ if [ $? -eq 1 ]; then
While this will prevent the tarball to be generated when
luv_storage=none, it will also try to generate the tarball when
luv_storage is not present at all in the command line. It is true that
this is an unlikely case, nothing prevents the user from modifying the
grub.cfg file.
You already have facilities to inspect the contents of luv_storage in
get_luv_url. Maybe the script could begin by checking the URL and, if
successful, generate the tarball. Alternatively, you could check if you
have luv_storage and then check if you have none as its parameter.
Thanks and BR,
Ricardo
tar -zcf /tmp/luv-results-$tstamp.tar.gz
${LUV_SAVE_RESULTS_DIR}
luv_tar_results=/tmp/luv-results-$tstamp.tar.gz
else