Comment 2 for bug 497385

Revision history for this message
jehon (jeanhonlet) wrote :

I did install ebox successfully one month ago, but now, I got the same problem when starting ebox...

$ sudo /etc/init.d/ebox usage
sh: Syntax error: "(" unexpected

$ sudo /usr/bin/perl /etc/init.d/ebox usage
sh: Syntax error: "(" unexpected

Which let me think it run under sh (instead of perl as indicated at first line of ebox)

$ sudo sh -x /etc/init.d/ebox usage
+ use strict
/etc/init.d/ebox: 1: use: not found
+ use warnings
/etc/init.d/ebox: 1: use: not found
+ use EBox::Global
/etc/init.d/ebox: 1: use: not found
+ use EBox
/etc/init.d/ebox: 1: use: not found
+ use EBox::Sudo
/etc/init.d/ebox: 1: use: not found
+ use File::Slurp
/etc/init.d/ebox: 1: use: not found
/etc/init.d/ebox: 18: Syntax error: "(" unexpected

Which confirm my idea: it run under sh instead of perl

Note that, strangely, if you run it without root priviledges (as normal user), it says:
$ /usr/bin/perl /etc/init.d/ebox usage
Cannot change user to ebox at /usr/share/perl5/EBox.pm line 137.

Which let me think it run correctly as perl executable.