Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
lxc
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chen Yisong
lxc
Commits
89f79f6b
Commit
89f79f6b
authored
Jan 06, 2014
by
Dwight Engen
Committed by
Stéphane Graber
Jan 06, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
allow multiple types of init scripts to be configured
Signed-off-by:
Dwight Engen
<
dwight.engen@oracle.com
>
Acked-by:
Stéphane Graber
<
stgraber@ubuntu.com
>
parent
6424619e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
19 deletions
+24
-19
configure.ac
configure.ac
+24
-19
No files found.
configure.ac
View file @
89f79f6b
...
...
@@ -73,21 +73,10 @@ AM_CONDITIONAL([DISTRO_UBUNTU], [test "x$with_distro" = "xubuntu"])
# Check for init system type
AC_MSG_CHECKING([for init system type])
AC_ARG_WITH([init-script],
[AC_HELP_STRING([--with-init-script@<:@=TYPE@:>@],
[Type of init script to install: sysv, systemd, upstart,
distro
, none
@<:@default=distro@:>@])],[],[with_init_script=distro])
[AC_HELP_STRING([--with-init-script@<:@=TYPE@
<:@,TYPE,...@:>@@
:>@],
[Type
(s)
of init script to install: sysv, systemd, upstart,
distro @<:@default=distro@:>@])],[],[with_init_script=distro])
case "$with_init_script" in
sysv)
init_script=sysv
;;
systemd)
init_script=systemd
;;
upstart)
init_script=upstart
;;
none)
;;
distro)
case $with_distro in
fedora)
...
...
@@ -96,6 +85,9 @@ case "$with_init_script" in
redhat|centos|oracle|oracleserver)
init_script=sysv
;;
debian)
init_script=sysv,upstart,systemd
;;
ubuntu)
init_script=upstart
;;
...
...
@@ -106,12 +98,25 @@ case "$with_init_script" in
esac
;;
*)
AC_MSG_ERROR([Unknown init system type $with_init_script])
init_script=$with_init_script
;;
esac
AM_CONDITIONAL([INIT_SCRIPT_SYSV], test "$init_script" = "sysv")
AM_CONDITIONAL([INIT_SCRIPT_SYSTEMD], test "$init_script" = "systemd")
AM_CONDITIONAL([INIT_SCRIPT_UPSTART], test "$init_script" = "upstart")
# Check valid init systems were given, run in subshell so we don't mess up IFS
(IFS="," ; for init_sys in $init_script;
do
case "$init_sys" in
none|sysv|systemd|upstart)
;;
*)
exit 1
;;
esac
done) || AC_MSG_ERROR([Unknown init system type in $init_script])
AM_CONDITIONAL([INIT_SCRIPT_SYSV], [echo "$init_script" |grep -q "sysv"])
AM_CONDITIONAL([INIT_SCRIPT_SYSTEMD], [echo "$init_script" |grep -q "systemd"])
AM_CONDITIONAL([INIT_SCRIPT_UPSTART], [echo "$init_script" |grep -q "upstart"])
AC_MSG_RESULT($init_script)
# Allow disabling rpath
...
...
@@ -659,7 +664,7 @@ cat << EOF
Environment:
- compiler: $CC
- distribution: $with_distro
- init script type: $init_script
- init script type
(s)
: $init_script
- rpath: $enable_rpath
- GnuTLS: $enable_gnutls
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment