removed references to building and dealing with service files, as that will now be limited to the invoke task
This commit is contained in:
parent
05830c6830
commit
50f331d93e
6 changed files with 1 additions and 173 deletions
|
@ -11,7 +11,7 @@ if WANT_GUI
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if WANT_DAEMON
|
if WANT_DAEMON
|
||||||
DAEMON = scripts daemon
|
DAEMON = daemon
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if WANT_NETNS
|
if WANT_NETNS
|
||||||
|
@ -124,8 +124,6 @@ all: change-files
|
||||||
.PHONY: change-files
|
.PHONY: change-files
|
||||||
change-files:
|
change-files:
|
||||||
$(call change-files,gui/core-gui)
|
$(call change-files,gui/core-gui)
|
||||||
$(call change-files,scripts/core-daemon.service)
|
|
||||||
$(call change-files,scripts/core-daemon)
|
|
||||||
$(call change-files,daemon/core/constants.py)
|
$(call change-files,daemon/core/constants.py)
|
||||||
$(call change-files,netns/setup.py)
|
$(call change-files,netns/setup.py)
|
||||||
$(call change-files,daemon/setup.py)
|
$(call change-files,daemon/setup.py)
|
||||||
|
|
14
configure.ac
14
configure.ac
|
@ -208,22 +208,12 @@ if [test "x$want_python" = "xyes" && test "x$enable_docs" = "xyes"] ; then
|
||||||
AS_IF([$PYTHON -c "import sphinx_rtd_theme" &> /dev/null], [], [AC_MSG_ERROR([doc dependency missing, please install python3 -m pip install sphinx-rtd-theme])])
|
AS_IF([$PYTHON -c "import sphinx_rtd_theme" &> /dev/null], [], [AC_MSG_ERROR([doc dependency missing, please install python3 -m pip install sphinx-rtd-theme])])
|
||||||
fi
|
fi
|
||||||
|
|
||||||
AC_ARG_WITH([startup],
|
|
||||||
[AS_HELP_STRING([--with-startup=option],
|
|
||||||
[option=systemd,suse,none to install systemd/SUSE init scripts])],
|
|
||||||
[with_startup=$with_startup],
|
|
||||||
[with_startup=initd])
|
|
||||||
AC_SUBST(with_startup)
|
|
||||||
AC_MSG_RESULT([using startup option $with_startup])
|
|
||||||
|
|
||||||
# Variable substitutions
|
# Variable substitutions
|
||||||
AM_CONDITIONAL(WANT_GUI, test x$enable_gui = xyes)
|
AM_CONDITIONAL(WANT_GUI, test x$enable_gui = xyes)
|
||||||
AM_CONDITIONAL(WANT_DAEMON, test x$enable_daemon = xyes)
|
AM_CONDITIONAL(WANT_DAEMON, test x$enable_daemon = xyes)
|
||||||
AM_CONDITIONAL(WANT_DOCS, test x$want_docs = xyes)
|
AM_CONDITIONAL(WANT_DOCS, test x$want_docs = xyes)
|
||||||
AM_CONDITIONAL(WANT_PYTHON, test x$want_python = xyes)
|
AM_CONDITIONAL(WANT_PYTHON, test x$want_python = xyes)
|
||||||
AM_CONDITIONAL(WANT_NETNS, test x$want_linux_netns = xyes)
|
AM_CONDITIONAL(WANT_NETNS, test x$want_linux_netns = xyes)
|
||||||
AM_CONDITIONAL(WANT_INITD, test x$with_startup = xinitd)
|
|
||||||
AM_CONDITIONAL(WANT_SYSTEMD, test x$with_startup = xsystemd)
|
|
||||||
AM_CONDITIONAL(WANT_VNODEDONLY, test x$enable_vnodedonly = xyes)
|
AM_CONDITIONAL(WANT_VNODEDONLY, test x$enable_vnodedonly = xyes)
|
||||||
|
|
||||||
if test $cross_compiling = no; then
|
if test $cross_compiling = no; then
|
||||||
|
@ -237,7 +227,6 @@ AC_CONFIG_FILES([Makefile
|
||||||
gui/version.tcl
|
gui/version.tcl
|
||||||
gui/Makefile
|
gui/Makefile
|
||||||
gui/icons/Makefile
|
gui/icons/Makefile
|
||||||
scripts/Makefile
|
|
||||||
man/Makefile
|
man/Makefile
|
||||||
docs/Makefile
|
docs/Makefile
|
||||||
daemon/Makefile
|
daemon/Makefile
|
||||||
|
@ -267,9 +256,6 @@ Daemon:
|
||||||
Daemon path: ${bindir}
|
Daemon path: ${bindir}
|
||||||
Daemon config: ${CORE_CONF_DIR}
|
Daemon config: ${CORE_CONF_DIR}
|
||||||
Python: ${PYTHON}
|
Python: ${PYTHON}
|
||||||
Logs: ${CORE_STATE_DIR}/log
|
|
||||||
|
|
||||||
Startup: ${with_startup}
|
|
||||||
|
|
||||||
Features to build:
|
Features to build:
|
||||||
Build GUI: ${enable_gui}
|
Build GUI: ${enable_gui}
|
||||||
|
|
2
scripts/.gitignore
vendored
2
scripts/.gitignore
vendored
|
@ -1,2 +0,0 @@
|
||||||
core-daemon
|
|
||||||
core-daemon.service
|
|
|
@ -1,31 +0,0 @@
|
||||||
# CORE
|
|
||||||
# (c)2011-2013 the Boeing Company.
|
|
||||||
# See the LICENSE file included in this distribution.
|
|
||||||
#
|
|
||||||
# author: Jeff Ahrenholz <jeffrey.m.ahrenholz@boeing.com>
|
|
||||||
#
|
|
||||||
# Makefile for installing scripts.
|
|
||||||
#
|
|
||||||
|
|
||||||
CLEANFILES = core-daemon
|
|
||||||
|
|
||||||
DISTCLEANFILES = Makefile.in core-daemon.service core-daemon
|
|
||||||
|
|
||||||
EXTRA_DIST = core-daemon.in core-daemon.service.in
|
|
||||||
|
|
||||||
SUBDIRS =
|
|
||||||
|
|
||||||
# install startup scripts based on --with-startup=option configure option
|
|
||||||
# init.d (default), systemd
|
|
||||||
if WANT_INITD
|
|
||||||
startupdir = /etc/init.d
|
|
||||||
startup_SCRIPTS = core-daemon
|
|
||||||
endif
|
|
||||||
if WANT_SYSTEMD
|
|
||||||
startupdir = /usr/lib/systemd/system
|
|
||||||
startup_SCRIPTS = core-daemon.service
|
|
||||||
endif
|
|
||||||
|
|
||||||
# remove extra scripts and their directories if they are empty
|
|
||||||
uninstall-hook:
|
|
||||||
rmdir -p $(startupdir) || true
|
|
|
@ -1,112 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
### BEGIN INIT INFO
|
|
||||||
# Provides: core-daemon
|
|
||||||
# Required-Start: $network $remote_fs
|
|
||||||
# Required-Stop: $network $remote_fs
|
|
||||||
# Default-Start: 2 3 4 5
|
|
||||||
# Default-Stop: 0 1 6
|
|
||||||
# Short-Description: Start the core-daemon CORE daemon at boot time
|
|
||||||
# Description: Starts and stops the core-daemon CORE daemon used to
|
|
||||||
# provide network emulation services for the CORE GUI
|
|
||||||
# or scripts.
|
|
||||||
### END INIT INFO
|
|
||||||
#
|
|
||||||
# chkconfig: 35 90 03
|
|
||||||
# description: Starts and stops the CORE daemon \
|
|
||||||
# used to provide network emulation services.
|
|
||||||
#
|
|
||||||
# config: /etc/core/
|
|
||||||
|
|
||||||
NAME=`basename $0`
|
|
||||||
PIDFILE="@CORE_STATE_DIR@/run/$NAME.pid"
|
|
||||||
LOG="@CORE_STATE_DIR@/log/$NAME.log"
|
|
||||||
CMD="@bindir@/$NAME"
|
|
||||||
|
|
||||||
get_pid() {
|
|
||||||
cat "$PIDFILE"
|
|
||||||
}
|
|
||||||
|
|
||||||
is_alive() {
|
|
||||||
[ -f "$PIDFILE" ] && ps -p `get_pid` > /dev/null 2>&1
|
|
||||||
}
|
|
||||||
|
|
||||||
corestart() {
|
|
||||||
if is_alive; then
|
|
||||||
echo "$NAME already started"
|
|
||||||
else
|
|
||||||
echo "starting $NAME"
|
|
||||||
$CMD 2>&1 >> "$LOG" &
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo $! > "$PIDFILE"
|
|
||||||
if ! is_alive; then
|
|
||||||
echo "unable to start $NAME, see $LOG"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
corestop() {
|
|
||||||
if is_alive; then
|
|
||||||
echo -n "stopping $NAME.."
|
|
||||||
kill `get_pid`
|
|
||||||
for i in 1 2 3 4 5; do
|
|
||||||
sleep 1
|
|
||||||
if ! is_alive; then
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
echo -n "."
|
|
||||||
done
|
|
||||||
echo
|
|
||||||
|
|
||||||
if is_alive; then
|
|
||||||
echo "not stopped; may still be shutting down"
|
|
||||||
exit 1
|
|
||||||
else
|
|
||||||
echo "stopped"
|
|
||||||
if [ -f "$PIDFILE" ]; then
|
|
||||||
rm -f "$PIDFILE"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
echo "$NAME not running"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
corerestart() {
|
|
||||||
corestop
|
|
||||||
corestart
|
|
||||||
}
|
|
||||||
|
|
||||||
corestatus() {
|
|
||||||
if is_alive; then
|
|
||||||
echo "$NAME is running"
|
|
||||||
else
|
|
||||||
echo "$NAME is stopped"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
case "$1" in
|
|
||||||
start)
|
|
||||||
corestart
|
|
||||||
;;
|
|
||||||
stop)
|
|
||||||
corestop
|
|
||||||
;;
|
|
||||||
restart)
|
|
||||||
corerestart
|
|
||||||
;;
|
|
||||||
force-reload)
|
|
||||||
corerestart
|
|
||||||
;;
|
|
||||||
status)
|
|
||||||
corestatus
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
echo "Usage: $0 {start|stop|restart|status}"
|
|
||||||
exit 1
|
|
||||||
esac
|
|
||||||
|
|
||||||
exit $?
|
|
||||||
|
|
|
@ -1,11 +0,0 @@
|
||||||
[Unit]
|
|
||||||
Description=Common Open Research Emulator Service
|
|
||||||
After=network.target
|
|
||||||
|
|
||||||
[Service]
|
|
||||||
Type=simple
|
|
||||||
ExecStart=@bindir@/core-daemon
|
|
||||||
TasksMax=infinity
|
|
||||||
|
|
||||||
[Install]
|
|
||||||
WantedBy=multi-user.target
|
|
Loading…
Reference in a new issue