filemnt wont mount iso with a space in the directory name this bug is in recent puppies saluki and racy.
/mnt/sdc6/sa luki/luki-0.0.2.iso wont mount
/mnt/sdc6/saluki/luki-0.0.2.iso will mount.
probably in other puppies as well
filemnt wont mount iso with space in the directory name.
ALLMOST ALL PUPPY SCRIPTS are NOT written to work with spaces in directory names and file names .
Should be simply
This is on puppy 430 --racy has got the new cryptmount part so this code may not work on racy ...
sed worked for me today but may not work another day .
for other scripts replace `which filemnt` with "$1"
so it would be ./make-space-proof.sh '/ p a t h / t o / f i l e n a m e .sh'
Should be simply
Code: Select all
[ ! -e `which filemnt`.backup ] && cp `which filemnt` `which filemnt`.backup
e=0
sed -i 's#\(\$[a-zA-Z]*\)#"\1"#g' `which filemnt`
e=$((e+$?))
sed -i 's#""#"#g' `which filemnt`
e=$((e+$?))
sed -i 's#= " #= ""#g' `which filemnt`
e=$((e+$?))
sed -i 's#= ""]#= "" ]#g' `which filemnt`
e=$((e+$?))
sed -i 's#"\$"#"\$#g' `which filemnt`
e=$((e+$?))
sed -i 's#"\$1}#"\$1"}#g' `which filemnt`
e=$((e+$?))
sed -i 's#"\$?#"\$?"#g' `which filemnt`
e=$((e+$?))
sed -i 's#Err="\$?""#Err="\$?"#g' `which filemnt`
e=$((e+$?))
sed -i 's#\*"\$/#\*\$/#g' `which filemnt`
e=$((e+$?))
sed -i 's#echo -e "\(.*\)"\(.*\)"#echo -e "\1\2"#g' `which filemnt`
e=$((e+$?))
sed -i 's#echo -e "\(.*\)"\(.*\)"#echo -e "\1\2"#g' `which filemnt`
e=$((e+$?))
sed -i 's#-text "\(.*\)"\(.*\)"#-text "\1\2"#g' `which filemnt`
e=$((e+$?))
sed -i 's#-text "\(.*\)"\(.*\)"#-text "\1\2"#g' `which filemnt`
e=$((e+$?))
sed -i 's#"basename "\$imgFile"#"`basename "\$imgFile"`"#g' `which filemnt` ##430 BUG
e=$((e+$?))
[ "$e" -ne '0' ] && echo ERR && cp -f `which filemnt`.backup `which filemnt`
sed worked for me today but may not work another day .
for other scripts replace `which filemnt` with "$1"
so it would be ./make-space-proof.sh '/ p a t h / t o / f i l e n a m e .sh'
@Karl Godt it is not clear what to do with your code so i cant test it.
assuming it isnt fixed,
so whatever happens there needs to be a better explanation that just "mount failed". something like "remove spaces in directory path, or move file to a different directory" if/when mount fails for this reason.
assuming it isnt fixed,
so whatever happens there needs to be a better explanation that just "mount failed". something like "remove spaces in directory path, or move file to a different directory" if/when mount fails for this reason.
The code double quotes all $VAR to "$VAR" in the script .
This does not harm as long there is no for content in $LIST in the code .
for content in "$LIST" would have only one content : the whole list .
So it is to double quote every $VAR and clean up afterwards if there had been already double quotes around $VARS in the script BUT restore tests again and xmessage/yaf-splash quoting ... and others ...
So you would probably need a
diff -up `which filemnt` `which filemnt`.backup
to check everything . diff may need to have the devx installed (?)
[ $var != 0 ] && echo H #would spit an error if var was not set before ~maybe good for debugging
[ "$var" != 0 ] && echo H #would not spit an error . I prefer quoting here too .
This does not harm as long there is no for content in $LIST in the code .
for content in "$LIST" would have only one content : the whole list .
So it is to double quote every $VAR and clean up afterwards if there had been already double quotes around $VARS in the script BUT restore tests again and xmessage/yaf-splash quoting ... and others ...
So you would probably need a
diff -up `which filemnt` `which filemnt`.backup
to check everything . diff may need to have the devx installed (?)
[ $var != 0 ] && echo H #would spit an error if var was not set before ~maybe good for debugging
[ "$var" != 0 ] && echo H #would not spit an error . I prefer quoting here too .