[arch-projects] [initscripts][PATCH] Fix FS#31563
Interpret exscape sequences in the filessytem target while unmounting. Having recursive unmount would be probably better (see falconindy's comment on the bug), but IMO this workaround is good enough. --- functions | 2 ++ 1 file changed, 2 insertions(+) diff --git a/functions b/functions index febcb25..14e7c0e 100644 --- a/functions +++ b/functions @@ -645,6 +645,8 @@ umount_all() { findmnt -mrunRo TARGET,FSTYPE,OPTIONS / | { while read -r target fstype options; do + # interpret the ascii chars, such as \x20 (space) + target=`echo -e $target` # match only targeted fstypes if [[ $1 && $1 != "$fstype" ]]; then continue -- 1.8.0
On Wed, Nov 7, 2012 at 1:57 AM, Lukáš Jirkovský
Interpret exscape sequences in the filessytem target while unmounting.
Having recursive unmount would be probably better (see falconindy's comment on the bug), but IMO this workaround is good enough. --- functions | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/functions b/functions index febcb25..14e7c0e 100644 --- a/functions +++ b/functions @@ -645,6 +645,8 @@ umount_all() {
findmnt -mrunRo TARGET,FSTYPE,OPTIONS / | { while read -r target fstype options; do + # interpret the ascii chars, such as \x20 (space) + target=`echo -e $target`
Strictly style, but $(), not ``, is always the modern preference. (Not commenting on whether I think this echo -e business is a good idea...)
# match only targeted fstypes if [[ $1 && $1 != "$fstype" ]]; then continue -- 1.8.0
On Wed, Nov 07, 2012 at 08:18:24AM -0600, Dan McGee wrote:
On Wed, Nov 7, 2012 at 1:57 AM, Lukáš Jirkovský
wrote: Interpret exscape sequences in the filessytem target while unmounting.
Having recursive unmount would be probably better (see falconindy's comment on the bug), but IMO this workaround is good enough. --- functions | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/functions b/functions index febcb25..14e7c0e 100644 --- a/functions +++ b/functions @@ -645,6 +645,8 @@ umount_all() {
findmnt -mrunRo TARGET,FSTYPE,OPTIONS / | { while read -r target fstype options; do + # interpret the ascii chars, such as \x20 (space) + target=`echo -e $target`
Strictly style, but $(), not ``, is always the modern preference. (Not commenting on whether I think this echo -e business is a good idea...)
I'll chime in that it isn't, and add that printf should probably be used instead: printf -v target '%b' "$target"
# match only targeted fstypes if [[ $1 && $1 != "$fstype" ]]; then continue -- 1.8.0
I'll chime in that it isn't, and add that printf should probably be used instead:
printf -v target '%b' "$target"
Thank you all for the comments. I'll send an updated patch soon (just figuring out how to correctly use in-reply-to). Lukas
Interpret exscape sequences in the filessytem target while unmounting. Having recursive unmount would be probably better (see falconindy's comment on the bug), but IMO this workaround is good enough. --- functions | 2 ++ 1 file changed, 2 insertions(+) diff --git a/functions b/functions index febcb25..16a6cd1 100644 --- a/functions +++ b/functions @@ -645,6 +645,8 @@ umount_all() { findmnt -mrunRo TARGET,FSTYPE,OPTIONS / | { while read -r target fstype options; do + # interpret the ascii chars, such as \x20 (space) + printf -v target '%b' "$target" # match only targeted fstypes if [[ $1 && $1 != "$fstype" ]]; then continue -- 1.8.0
participants (4)
-
Dan McGee
-
Dave Reisner
-
Lukas Jirkovsky
-
Lukáš Jirkovský