[Pkg-ltsp-devel] Bug#690618: ltsp-server: bashism in /usr/sbin/ltsp-config
Vagrant Cascadian
vagrant at debian.org
Sat Nov 10 20:47:39 UTC 2012
Control: retitle 690618 ltsp-server: bashism in /usr/sbin/ltsp-config
Control: tags 690618 pending patch
On Mon, Oct 15, 2012 at 09:29:02PM -0500, Raphael Geissert wrote:
> checkbashisms' output:
> >possible bashism in ./usr/sbin/ltsp-config line 57 (echo -e):
> > echo -e "$replace" >> "$file"
This is fixed upstream, as well as several other uses of echo that caused
ltsp-config to fail, which are also now fixed upstream. The following patch
fixes both cases:
=== modified file 'server/ltsp-config'
--- server/ltsp-config 2012-06-07 06:41:39 +0000
+++ server/ltsp-config 2012-10-30 19:39:16 +0000
@@ -54,7 +54,7 @@
if grep -q "$match" "$file"; then
sed "s/$match/$replace/" -i "$file"
else
- echo -e "$replace" >> "$file"
+ printf "$replace\n" >> "$file"
fi
}
@@ -123,7 +123,8 @@
# do nothing on these networks
;;
*)
- echo "${separator}dhcp-range=$subnet,proxy"
+ # echo in dash translates "\n", use printf to keep it
+ printf "%s" "${separator}dhcp-range=$subnet,proxy"
# Insert a separator only after the first line
separator="\n"
;;
live well,
vagrant
More information about the Pkg-ltsp-devel
mailing list