[Debian-ha-maintainers] Bug#530062: csync2: bashism in /bin/sh script

Jonathan Nieder jrnieder at gmail.com
Tue Oct 5 23:41:13 UTC 2010


severity 530062 minor
tags 530062 + patch
quit

Raphael Geissert wrote:

> Usertags: goal-dash
[...]
>> possible bashism in ./usr/share/csync2/csync2_locheck.sh line 31 (should be
>> read [-r] variable):
>>	  if read -p "Do you really want to logout? " in &&

This works fine in dash, but not in ksh derivatives (e.g., ksh93), which
use -p for something else.  So it is still not policy-compliant for an
sh script.  In general, read -p should be replaced with printf
followed by read.

More to the point, this is a sample .bash_logout file.  Patch follows.

diff --git a/csync2_locheck.sh b/csync2_locheck.sh
index c5da2ab..b6450ac 100644
--- a/csync2_locheck.sh
+++ b/csync2_locheck.sh
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 #
 #  Example /root/.bash_logout file for csync2.
 #
-- 





More information about the Debian-ha-maintainers mailing list