Opened 10 years ago
Closed 8 years ago
#2527 closed defect (fixed)
mapguide init script use log_daemon_msg and log_end_msg which are not defined in Centos 6
Reported by: | gabrimonfa | Owned by: | |
---|---|---|---|
Priority: | low | Milestone: | |
Component: | General | Version: | |
Severity: | trivial | Keywords: | |
Cc: | External ID: |
Description
Mapguide 3.0.0 centos 6 64bit.
AFAIK log_daemon_msg and log_end_msg are not defined in Centos 6 even if lsb package is installed.
A possible solution would be to define them at the beginning of mapguide script, so they are eventually overwritten by sourcing /lib/lsb/init-functions
Attachments (1)
Change History (5)
comment:1 by , 10 years ago
comment:2 by , 10 years ago
I'm not really an expert on the topic.
"log_daemon_msg" may be replaced with a simple "echo -n" (as in other init scripts).
"log_end_message" gives different results in debian/ubuntu whether the argument is 0 or greater than 0 and usually is used with the exit code of a previous command. If called with 0 it shows a success message, otherwise a failure message.
However in our script it is always called with 0 as argument, so it may be replaced by "log_success_msg" which is supported on both ubuntu and centos.
comment:3 by , 9 years ago
The proposed file try to address the following problems:
- define log_end_msg if not defined in lsb functions (as in Centos 6)
- define status and restart actions
- exit with failures if something goes wrong
- warn user if trying to start MapGuide and it is already running
- warn user if trying to stop MapGuide and it is not running
I've not tested it throughly in Ubuntu
by , 9 years ago
In this version I've tried to purge the script from "bashisms", to make it runnable under dash
comment:4 by , 8 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
This is the service control script in its current form:
http://trac.osgeo.org/mapguide/browser/trunk/MgDev/Server/src/Core/mapguidectl
What changes could you suggest that would allow this script to work seamlessly on both CentOS and Ubuntu?