Summary: | app-emulation/lxd: lxd-*.initd are not POSIX compliant | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Andrew Savchenko <bircoph> |
Component: | Current packages | Assignee: | Erik Mackdanz <stasibear> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | zmedico |
Priority: | Normal | Keywords: | PATCH |
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 609070 | ||
Attachments: | lxd.init.patch |
Description
Andrew Savchenko
2017-02-12 17:20:37 UTC
I changed this for the latest 2.11 and subsequent versions. I did not change existing versions, but they will fall off over time. With the current lxd-2.11.initd, I see the following message on service start: $ sudo /etc/init.d/lxd restart /etc/init.d/lxd: line 30: [: =: unary operator expected /etc/init.d/lxd: line 30: [: =: unary operator expected Current line 30 is: if [ $RC_GOINGDOWN = YES ] || [ $RC_REBOOT = YES ]; then Changing line 30 to quote the arguments of the equality comparison avoids the warning: if [ "$RC_GOINGDOWN" = "YES" ] || [ "$RC_REBOOT" = "YES" ]; then I haven't stepped through to check the conditions where one of the $RC_ are true, but if they are blank, as in the case of a service restart, I think the test fails. Yes, double quotes are mandatory and are present in the original patch. Erik, please fix this. (In reply to Andrew Savchenko from comment #4) > Yes, double quotes are mandatory and are present in the original patch. > Erik, please fix this. I've included then in the lxd-2.14 version bump: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7c15f08e00643b789f3ab4fcf80250b982bc5f2c |