[GRLUG] query re service --status-all
Nathan Phillip Brink
binki at gentoo.org
Sat Nov 30 00:19:32 EST 2013
On Fri, Nov 29, 2013 at 10:21:06PM -0500, Eric Beversluis wrote:
>
> On Fri, 2013-11-29 at 20:48 -0500, Adam Tauno Williams wrote:
> > On Fri, 2013-11-29 at 18:39 -0500, Eric Beversluis wrote:
> > > I'm running 'service --status-all'. This doesn't look like the kind of
> > > result I should get, based on what I've seen online. Where are 'httpd',
> > > 'mysqld' and the many other services that surely are running? 'ebtables'
> > > isn't a process running on my computer.
> >
> > ebtables is not a process, it is Ethernet Bridging. Are you bridging
> > with this box?
> >
> > What is the package that owns that script?
> >
> > rpm -qf /etc/init.d/ebtables
> >
> > If you are not using bridging I'd see if I could remove the package.
> >
> > It is very odd to have such a syntax error in the service script.
> > Someone must have at least played with bridging at some point or I don't
> > think the file would have been generated.
> Package is ebtables-2.0.10-8.fc19.x86_64.
>
> rpm -e ebtables-2.0.10-8.fc19.x86_64 =>
> error: Failed dependencies:
> ebtables is needed by (installed) firewalld-0.3.8-1.fc19.noarch
> ebtables is needed by (installed) libvirt-daemon-1.0.5.7-2.fc19.x86_64
>
> No one has used the computer but me and the installation is only a month
> or so old. Can bridging happen unintentionally?
>
> Is this the syntax error statement?
> > > /etc/init.d/ebtables: line 19: [: =: unary operator expected
This sort of error can be reproduced by the following:
ohnobinki at gibby ~ $ if [ = x ]; then echo yes; else echo no; fi
bash: [: =: unary operator expected
no
You most often would get this behavior if you have an underquoted
variable expansion where the script’s author assumed that the expanded
variable would be non-zero length. For example, the incorrect syntax:
ohnobinki at gibby ~ $ if [ ${undefined_variable} = x ]; then echo yes; else echo no; fi
bash: [: =: unary operator expected
no
And corrected syntax:
ohnobinki at gibby ~ $ if [ "${undefined_variable}" = x ]; then echo yes; else echo no; fi
no
> Is that what's keeping 'service --status-all' from running properly?
I have no idea, I don’t know what this ebtables script looks like nor
how it’s supposed to work :-/. Depending on what exactly the script
was trying to test, this underquoting may be what causes it to output…
iptables-style rules(?) instead of its current status. Sorry that I
can’t help with fedora, but maybe the sh syntax error explanation can
be helpful.
--
binki
Look out for missing or extraneous apostrophes!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: not available
URL: <http://shinobu.grlug.org/pipermail/grlug/attachments/20131130/f9a7bf2b/attachment-0001.pgp>
More information about the grlug
mailing list