Public bug reported: I am integrating the runtime script in my custom script so I can use some of the utilities it provides. My custom script is currently in a path which contains white space causing the "log_only" function call to not work correctly because the command passed has unescaped variables. For instance it was causing base name to complain about extra operands, which is completely unrelated.
The line is /usr/share/runtime@795: log_only "$(date '+%b %d %H:%M:%S') $(uname -n | sed 's|\..*$||') ldapscripts: $(basename $0)($USER): $0 $*" The proposed change: log_only "$(date '+%b %d %H:%M:%S') $(uname -n | sed 's|\..*$||') ldapscripts: $(basename '$0')($USER): '$0' '$*'" Notice the single quotes around $0 and $*. I didn't escape $USER because it is not supposed to have white spaces ever, but feel free to decide that. ** Affects: ldapscripts (Ubuntu) Importance: Undecided Status: New -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1218775 Title: Variable to basename unescaped To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/ldapscripts/+bug/1218775/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs