Filesystem agent requires a bash shell
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
heartbeat (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Binary package hint: heartbeat
Description: Ubuntu 8.04
Release: 8.04
heartbeat 2.1.3-2
The following code in the OCF Filesystem (starting with line 724) agent does
not seem to be compatible with a plain /bin/sh (like dash):
case $DEVICE in
"") ocf_log err "Please set OCF_RESKEY_device to the device to be managed"
exit $OCF_ERR_ARGS
;;
-*) # Oh... An option to mount instead... Typically -U or -L
;;
[^/]*:/*) # An NFS filesystem specification...
;;
//[^/]*/*) # An SMB filesystem specification...
;;
/dev/null) # Special case for BSC
;;
*) if [ ! -b "$DEVICE" -a ! -d "$DEVICE" -a "X$OP" != Xstart ] ; then
to exist"
fi
if [ ! -d "$DEVICE" ];then
fi
;;
esac
The case for nfs does not match if the script is invoked with dash, but it does
if it is run with sh.
Hi,
The key seems to be to use ! instead of ^ for negation in character clases. OCF/Filesystem portion of the attached patch should resolve this problem.
The resources/
The other portions are probably also needed by the ubuntu package to solve other
as yet unreproted problems of the same nature.
I have commited this change upstream as hg.linux- ha.org/ dev/rev/ 5aea0e314a77
http://
I intend to include it in version 2.1.3-8 of the Debian package.