Compare commits
25 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ffededbf95 | ||
|
|
b0efb663f9 | ||
|
|
aa69e48125 | ||
|
|
4ba10f1d50 | ||
|
|
38a9e2ff63 | ||
|
|
783af5abac | ||
|
|
75c3b53e31 | ||
|
|
c300c180a2 | ||
|
|
be8d2ee6e3 | ||
|
|
d9ef1bb635 | ||
|
|
cfc6991219 | ||
|
|
97ae5af201 | ||
|
|
4c820a0e48 | ||
|
|
9c39b381a5 | ||
|
|
321bb2cd90 | ||
|
|
8c99d817d4 | ||
| 2e1fb4d02b | |||
|
|
a2f0afb8bc | ||
|
|
430fa132f2 | ||
|
|
12cd7ce9de | ||
|
|
167acac140 | ||
|
|
f839ba27c5 | ||
|
|
80dd6aac5f | ||
|
|
0d00b8d8ab | ||
|
|
551bdff2fb |
206
ChangeLog
206
ChangeLog
@@ -1,3 +1,209 @@
|
|||||||
|
commit aa69e48125df7684ab3b77eaf9013f8c126b1fca
|
||||||
|
Author: William Hubbs <w.d.hubbs@gmail.com>
|
||||||
|
Commit: William Hubbs <w.d.hubbs@gmail.com>
|
||||||
|
|
||||||
|
build: fix rootprefix
|
||||||
|
|
||||||
|
This fixes #438.
|
||||||
|
|
||||||
|
commit 4ba10f1d5074a45b4ddd96d2d404842fa3b38e63
|
||||||
|
Author: William Hubbs <w.d.hubbs@gmail.com>
|
||||||
|
Commit: William Hubbs <w.d.hubbs@gmail.com>
|
||||||
|
|
||||||
|
link runscript with audit
|
||||||
|
|
||||||
|
commit 38a9e2ff630b0e0bd261afb2e66072f904b5d608
|
||||||
|
Author: William Hubbs <w.d.hubbs@gmail.com>
|
||||||
|
Commit: William Hubbs <w.d.hubbs@gmail.com>
|
||||||
|
|
||||||
|
link openrc-run with audit and libpam_misc
|
||||||
|
|
||||||
|
commit 783af5abac209c7745fd5c06dc89b2f5dfa3b313
|
||||||
|
Author: William Hubbs <w.d.hubbs@gmail.com>
|
||||||
|
Commit: William Hubbs <w.d.hubbs@gmail.com>
|
||||||
|
|
||||||
|
version 0.44.4
|
||||||
|
|
||||||
|
commit 75c3b53e3195f2d3541a7d83920667d1c4b14337
|
||||||
|
Author: William Hubbs <w.d.hubbs@gmail.com>
|
||||||
|
Commit: William Hubbs <w.d.hubbs@gmail.com>
|
||||||
|
|
||||||
|
update ChangeLog
|
||||||
|
|
||||||
|
commit c300c180a2a7dbefb46272c2acac6462372b8eb0
|
||||||
|
Author: Natanael Copa <ncopa@alpinelinux.org>
|
||||||
|
Commit: William Hubbs <w.d.hubbs@gmail.com>
|
||||||
|
|
||||||
|
hide error when migrating /var/run to /run
|
||||||
|
|
||||||
|
The script tries to copy non-existing files. We simply hide the error
|
||||||
|
|
||||||
|
http://bugs.alpinelinux.org/issues/3160
|
||||||
|
This fixes #451.
|
||||||
|
|
||||||
|
commit be8d2ee6e35a6ea504e6a3cf725b8804dd2da617
|
||||||
|
Author: Natanael Copa <ncopa@alpinelinux.org>
|
||||||
|
Commit: William Hubbs <w.d.hubbs@gmail.com>
|
||||||
|
|
||||||
|
force root to be rw before localmount
|
||||||
|
|
||||||
|
The original service that pulled in root remount was mtab which
|
||||||
|
is not part of OpenRC.
|
||||||
|
|
||||||
|
This fixes #449.
|
||||||
|
|
||||||
|
commit d9ef1bb6355c62e335a972f203806210de68912f
|
||||||
|
Author: Aaditya Bagga <aaditya_gnulinux@zoho.com>
|
||||||
|
Commit: William Hubbs <w.d.hubbs@gmail.com>
|
||||||
|
|
||||||
|
[runit integration] give a bit of time to start the service
|
||||||
|
|
||||||
|
Currently, we run sv start immediately after linking the service.
|
||||||
|
The runsv process may not be up at the moment, as a result of which
|
||||||
|
openrc will mark the service as stopped, even though it may be brought up
|
||||||
|
by runit at the next scan.
|
||||||
|
|
||||||
|
This is documented in the gentoo wiki:
|
||||||
|
https://wiki.gentoo.org/wiki/Runit#OpenRC.27s_runit_integration_feature
|
||||||
|
|
||||||
|
This PR adds a timeout so that correct process state can be reported.
|
||||||
|
|
||||||
|
Before:
|
||||||
|
* Starting netdata-runit ...
|
||||||
|
fail: /run/openrc/sv/netdata: runsv not running
|
||||||
|
* Failed to start netdata-runit
|
||||||
|
|
||||||
|
After:
|
||||||
|
* Starting netdata-runit ...
|
||||||
|
fail: /run/openrc/sv/netdata: runsv not running
|
||||||
|
ok: run: /run/openrc/sv/netdata: (pid 9042) 0s
|
||||||
|
|
||||||
|
This fixes #253.
|
||||||
|
|
||||||
|
commit cfc699121960a8298c8e9519239c149f31a35ef0
|
||||||
|
Author: Jakub Jirutka <jakub@jirutka.cz>
|
||||||
|
Commit: William Hubbs <w.d.hubbs@gmail.com>
|
||||||
|
|
||||||
|
Fix undeclared UT_LINESIZE
|
||||||
|
|
||||||
|
Fix the following error:
|
||||||
|
|
||||||
|
broadcast.c:41:21: error: '__UT_LINESIZE' undeclared (first use in this function); did you mean 'UT_LINESIZE'?
|
||||||
|
#define UT_LINESIZE __UT_LINESIZE
|
||||||
|
^~~~~~~~~~
|
||||||
|
|
||||||
|
Constant UT_LINESIZE is defined in <utmp.h> provided by musl.
|
||||||
|
|
||||||
|
commit 97ae5af2017df2667e0c79d7dac3706b3a93c6cc
|
||||||
|
Author: Sören Tempel <soeren+git@soeren-tempel.net>
|
||||||
|
Commit: William Hubbs <w.d.hubbs@gmail.com>
|
||||||
|
|
||||||
|
rc-mount: make timeout invocation compatible with busybox timeout
|
||||||
|
|
||||||
|
Busybox timeout does not support the `-k` flag. As such, invoking fuser
|
||||||
|
from do_unmount never worked without this patch. This went unnoticed as
|
||||||
|
standard error is redirected to /dev/null. This patch fixes this by
|
||||||
|
simply removing the incompatible `-k` flag.
|
||||||
|
|
||||||
|
[Ariadne: the `-k` is redundant anyway, since we are sending the KILL
|
||||||
|
signal to begin with.]
|
||||||
|
|
||||||
|
commit 4c820a0e48301f997911a196d6159670dad68296
|
||||||
|
Author: William Hubbs <w.d.hubbs@gmail.com>
|
||||||
|
Commit: William Hubbs <w.d.hubbs@gmail.com>
|
||||||
|
|
||||||
|
version 0.44.3
|
||||||
|
|
||||||
|
commit 9c39b381a5185325dc1359b6001f00e60732ec71
|
||||||
|
Author: William Hubbs <w.d.hubbs@gmail.com>
|
||||||
|
Commit: William Hubbs <w.d.hubbs@gmail.com>
|
||||||
|
|
||||||
|
update ChangeLog
|
||||||
|
|
||||||
|
commit 321bb2cd90cf673d03175c56bf1cecfcef02bd49
|
||||||
|
Author: Ariadne Conill <ariadne@dereferenced.org>
|
||||||
|
Commit: William Hubbs <w.d.hubbs@gmail.com>
|
||||||
|
|
||||||
|
fix build under musl 1.2 on 32 bit systems
|
||||||
|
|
||||||
|
Since musl 1.2 time_t is a 64 bit value, even on 32 bit systems. A
|
||||||
|
hotfix for printing the value is simply using PRIu64 from inttypes.h
|
||||||
|
in the format string.
|
||||||
|
|
||||||
|
This fixes #446.
|
||||||
|
|
||||||
|
commit 8c99d817d48bc879504b8973d868e1718f4e7d12
|
||||||
|
Author: Ariadne Conill <ariadne@dereferenced.org>
|
||||||
|
Commit: William Hubbs <w.d.hubbs@gmail.com>
|
||||||
|
|
||||||
|
fix trailing whitespace in tools/meson_runlevels.sh
|
||||||
|
|
||||||
|
commit 2e1fb4d02b1ad294394107642aed07f057e6a8b9
|
||||||
|
Author: artoo <artoo@artixlinux.org>
|
||||||
|
Commit: William Hubbs <w.d.hubbs@gmail.com>
|
||||||
|
|
||||||
|
meson: fix symlinks with sysvinit
|
||||||
|
|
||||||
|
commit a2f0afb8bcb024c8d532d8be8b855d72f999aab8
|
||||||
|
Author: William Hubbs <w.d.hubbs@gmail.com>
|
||||||
|
Commit: William Hubbs <w.d.hubbs@gmail.com>
|
||||||
|
|
||||||
|
version 0.44.2
|
||||||
|
|
||||||
|
commit 430fa132f2596de126f8461f361333c89b794945
|
||||||
|
Author: William Hubbs <w.d.hubbs@gmail.com>
|
||||||
|
Commit: William Hubbs <w.d.hubbs@gmail.com>
|
||||||
|
|
||||||
|
update ChangeLog
|
||||||
|
|
||||||
|
commit 12cd7ce9dea73926c203c5d64e425d51e209425a
|
||||||
|
Author: William Hubbs <w.d.hubbs@gmail.com>
|
||||||
|
Commit: William Hubbs <w.d.hubbs@gmail.com>
|
||||||
|
|
||||||
|
build: install pam files
|
||||||
|
|
||||||
|
commit 167acac1407782d454be2cc413431c00498e94ed
|
||||||
|
Author: William Hubbs <w.d.hubbs@gmail.com>
|
||||||
|
Commit: William Hubbs <w.d.hubbs@gmail.com>
|
||||||
|
|
||||||
|
meson: typo fix
|
||||||
|
|
||||||
|
commit f839ba27c5e52990ca9c6431bba4455a1124f81d
|
||||||
|
Author: William Hubbs <w.d.hubbs@gmail.com>
|
||||||
|
Commit: William Hubbs <w.d.hubbs@gmail.com>
|
||||||
|
|
||||||
|
version 0.44.1
|
||||||
|
|
||||||
|
commit 80dd6aac5fcb1f17b86d35db2babe487b90d7081
|
||||||
|
Author: William Hubbs <w.d.hubbs@gmail.com>
|
||||||
|
Commit: William Hubbs <w.d.hubbs@gmail.com>
|
||||||
|
|
||||||
|
update ChangeLog
|
||||||
|
|
||||||
|
commit 0d00b8d8abe33c4d824446ed989e8cc3166590b4
|
||||||
|
Author: William Hubbs <w.d.hubbs@gmail.com>
|
||||||
|
Commit: William Hubbs <w.d.hubbs@gmail.com>
|
||||||
|
|
||||||
|
build: fix sysvinit script installation
|
||||||
|
|
||||||
|
commit 551bdff2fbe61452187d5d492377b876e868a9fb
|
||||||
|
Author: William Hubbs <w.d.hubbs@gmail.com>
|
||||||
|
Commit: William Hubbs <w.d.hubbs@gmail.com>
|
||||||
|
|
||||||
|
build: fix symlinks
|
||||||
|
|
||||||
|
commit 803aa1c637c42352c05a520dbb02bee6c03ccf75
|
||||||
|
Author: William Hubbs <w.d.hubbs@gmail.com>
|
||||||
|
Commit: William Hubbs <w.d.hubbs@gmail.com>
|
||||||
|
|
||||||
|
version 0.44
|
||||||
|
|
||||||
|
commit fb186a38673201a7a25d6a7c1516fcb734020ee1
|
||||||
|
Author: William Hubbs <w.d.hubbs@gmail.com>
|
||||||
|
Commit: William Hubbs <w.d.hubbs@gmail.com>
|
||||||
|
|
||||||
|
update ChangeLog
|
||||||
|
|
||||||
commit c9b64b64fa9b2d2ee31684e8d35375f4c5bddba1
|
commit c9b64b64fa9b2d2ee31684e8d35375f4c5bddba1
|
||||||
Author: William Hubbs <w.d.hubbs@gmail.com>
|
Author: William Hubbs <w.d.hubbs@gmail.com>
|
||||||
Commit: William Hubbs <w.d.hubbs@gmail.com>
|
Commit: William Hubbs <w.d.hubbs@gmail.com>
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
NAME= openrc
|
NAME= openrc
|
||||||
VERSION= 0.44
|
VERSION= 0.44.5
|
||||||
PKG= ${NAME}-${VERSION}
|
PKG= ${NAME}-${VERSION}
|
||||||
|
|||||||
@@ -113,8 +113,10 @@ migrate_to_run()
|
|||||||
rm $src
|
rm $src
|
||||||
elif [ ! -L $src -a -d $src ]; then
|
elif [ ! -L $src -a -d $src ]; then
|
||||||
ebegin "Migrating $src to $dst"
|
ebegin "Migrating $src to $dst"
|
||||||
cp -a $src/* $dst/
|
if ! rmdir $src 2>/dev/null; then
|
||||||
rm -rf $src
|
cp -a $src/* $dst/
|
||||||
|
rm -rf $src
|
||||||
|
fi
|
||||||
eend $?
|
eend $?
|
||||||
fi
|
fi
|
||||||
# If $src doesn't exist at all, just run this
|
# If $src doesn't exist at all, just run this
|
||||||
|
|||||||
@@ -13,9 +13,9 @@ description="Mounts disks and swap according to /etc/fstab."
|
|||||||
|
|
||||||
depend()
|
depend()
|
||||||
{
|
{
|
||||||
need fsck
|
need fsck root
|
||||||
use lvm modules root
|
use lvm modules
|
||||||
after clock lvm modules root
|
after clock lvm modules
|
||||||
keyword -docker -jail -lxc -prefix -systemd-nspawn -vserver
|
keyword -docker -jail -lxc -prefix -systemd-nspawn -vserver
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
26
meson.build
26
meson.build
@@ -1,5 +1,5 @@
|
|||||||
project('OpenRC', 'c',
|
project('OpenRC', 'c',
|
||||||
version : '0.44',
|
version : '0.44.5',
|
||||||
license: 'BSD-2',
|
license: 'BSD-2',
|
||||||
default_options : [
|
default_options : [
|
||||||
'c_std=c99',
|
'c_std=c99',
|
||||||
@@ -72,19 +72,19 @@ else
|
|||||||
split_usr = get_option('split-usr') == 'true'
|
split_usr = get_option('split-usr') == 'true'
|
||||||
endif
|
endif
|
||||||
|
|
||||||
rootprefix_default = split_usr ? '/' : '/usr'
|
rootprefix = get_option('rootprefix')
|
||||||
rootprefix_path = get_option('rootprefix')
|
rootprefix_default = '/'
|
||||||
rootprefix = rootprefix_path != '' ? rootprefix_path : rootprefix_default
|
if rootprefix == ''
|
||||||
|
rootprefix = rootprefix_default
|
||||||
|
endif
|
||||||
|
|
||||||
bindir = rootprefix / get_option('bindir')
|
bindir = rootprefix / get_option('bindir')
|
||||||
libdir = rootprefix / get_option('libdir')
|
libdir = rootprefix / get_option('libdir')
|
||||||
if os == 'Linux' and split_usr
|
libexecdir = get_option('libexecdir')
|
||||||
libexecpath = 'lib'
|
if os == 'Linux' and libexecdir == 'libexec'
|
||||||
else
|
libexecdir = 'lib'
|
||||||
libexecpath = get_option('libexecdir')
|
|
||||||
endif
|
endif
|
||||||
libexecdir = split_usr ? rootprefix / libexecpath :
|
libexecdir = rootprefix / libexecdir
|
||||||
get_option('prefix') / libexecpath
|
|
||||||
rc_libexecdir = libexecdir / 'rc'
|
rc_libexecdir = libexecdir / 'rc'
|
||||||
sbindir = rootprefix / get_option('sbindir')
|
sbindir = rootprefix / get_option('sbindir')
|
||||||
|
|
||||||
@@ -164,6 +164,9 @@ subdir('etc')
|
|||||||
subdir('init.d')
|
subdir('init.d')
|
||||||
subdir('local.d')
|
subdir('local.d')
|
||||||
subdir('man')
|
subdir('man')
|
||||||
|
if get_option('pam')
|
||||||
|
subdir('pam')
|
||||||
|
endif
|
||||||
if get_option('pkgconfig')
|
if get_option('pkgconfig')
|
||||||
subdir('pkgconfig')
|
subdir('pkgconfig')
|
||||||
endif
|
endif
|
||||||
@@ -180,7 +183,8 @@ meson.add_install_script('tools/meson_runlevels.sh',
|
|||||||
os,
|
os,
|
||||||
get_option('newnet') ? 'yes' : 'no',
|
get_option('newnet') ? 'yes' : 'no',
|
||||||
rc_libexecdir,
|
rc_libexecdir,
|
||||||
get_option('sysconfdir'))
|
get_option('sysconfdir'),
|
||||||
|
get_option('sysvinit') ? 'yes' : 'no')
|
||||||
meson.add_install_script('tools/meson_final.sh',
|
meson.add_install_script('tools/meson_final.sh',
|
||||||
rc_libexecdir,
|
rc_libexecdir,
|
||||||
os)
|
os)
|
||||||
|
|||||||
9
pam/meson.build
Normal file
9
pam/meson.build
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
pam_dir = get_option('sysconfdir') / 'pam.d'
|
||||||
|
|
||||||
|
pam_files = [
|
||||||
|
'start-stop-daemon',
|
||||||
|
'supervise-daemon',
|
||||||
|
]
|
||||||
|
|
||||||
|
install_data(pam_files,
|
||||||
|
install_dir : pam_dir)
|
||||||
6
pam/start-stop-daemon
Normal file
6
pam/start-stop-daemon
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
#%PAM-1.0
|
||||||
|
|
||||||
|
auth required pam_permit.so
|
||||||
|
account required pam_permit.so
|
||||||
|
password required pam_deny.so
|
||||||
|
session optional pam_limits.so
|
||||||
6
pam/supervise-daemon
Normal file
6
pam/supervise-daemon
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
#%PAM-1.0
|
||||||
|
|
||||||
|
auth required pam_permit.so
|
||||||
|
account required pam_permit.so
|
||||||
|
password required pam_deny.so
|
||||||
|
session optional pam_limits.so
|
||||||
@@ -12,10 +12,10 @@ scripts_Linux = [
|
|||||||
]
|
]
|
||||||
|
|
||||||
scripts_sysvinit = [
|
scripts_sysvinit = [
|
||||||
'halt',
|
'halt.in',
|
||||||
'poweroff',
|
'poweroff.in',
|
||||||
'shutdown',
|
'shutdown.in',
|
||||||
'reboot',
|
'reboot.in',
|
||||||
]
|
]
|
||||||
|
|
||||||
install_data(scripts_internal,
|
install_data(scripts_internal,
|
||||||
|
|||||||
@@ -8,7 +8,12 @@ sbindir="$2"
|
|||||||
binaries=" halt poweroff rc-sstat reboot shutdown"
|
binaries=" halt poweroff rc-sstat reboot shutdown"
|
||||||
for f in $binaries; do
|
for f in $binaries; do
|
||||||
if [ -x "${DESTDIR}${rc_libexecdir}/bin/${f}" ]; then
|
if [ -x "${DESTDIR}${rc_libexecdir}/bin/${f}" ]; then
|
||||||
ln -snf "${DESTDIR}${rc_libexecdir}/bin/${f}" \
|
ln -snf "${rc_libexecdir}/bin/${f}" \
|
||||||
"${DESTDIR}${sbindir}/${f}"
|
"${DESTDIR}${sbindir}/${f}"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
# sysvinit is active when halt exits
|
||||||
|
if [ -x "${DESTDIR}${rc_libexecdir}/bin/halt" ]; then
|
||||||
|
ln -snf "${sbindir}/openrc-init" \
|
||||||
|
"${DESTDIR}${sbindir}/init"
|
||||||
|
fi
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ do_unmount()
|
|||||||
retry=4 # Effectively TERM, sleep 1, TERM, sleep 1, KILL, sleep 1
|
retry=4 # Effectively TERM, sleep 1, TERM, sleep 1, KILL, sleep 1
|
||||||
while ! LC_ALL=C $cmd "$mnt" 2>/dev/null; do
|
while ! LC_ALL=C $cmd "$mnt" 2>/dev/null; do
|
||||||
if command -v fuser >/dev/null 2>&1; then
|
if command -v fuser >/dev/null 2>&1; then
|
||||||
pids="$(timeout -k 10 -s KILL "${rc_fuser_timeout:-60}" \
|
pids="$(timeout -s KILL "${rc_fuser_timeout:-60}" \
|
||||||
fuser $f_opts "$mnt" 2>/dev/null)"
|
fuser $f_opts "$mnt" 2>/dev/null)"
|
||||||
fi
|
fi
|
||||||
case " $pids " in
|
case " $pids " in
|
||||||
|
|||||||
16
sh/runit.sh
16
sh/runit.sh
@@ -20,8 +20,20 @@ runit_start()
|
|||||||
service_link="${RC_SVCDIR}/sv/${service_path##*/}"
|
service_link="${RC_SVCDIR}/sv/${service_path##*/}"
|
||||||
ebegin "Starting ${name:-$RC_SVCNAME}"
|
ebegin "Starting ${name:-$RC_SVCNAME}"
|
||||||
ln -snf "${service_path}" "${service_link}"
|
ln -snf "${service_path}" "${service_link}"
|
||||||
sv start "${service_link}" > /dev/null 2>&1
|
local i=0 retval=1
|
||||||
eend $? "Failed to start ${name:-$RC_SVCNAME}"
|
# it can take upto 5 seconds for runsv to start
|
||||||
|
while [ $i -lt 6 ] ; do
|
||||||
|
if sv start "${service_link}" > /dev/null 2>&1; then
|
||||||
|
retval=0
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
sleep 1 && i=$(expr $i + 1)
|
||||||
|
done
|
||||||
|
if [ $retval -eq 1 ]; then
|
||||||
|
# clean up the link else sv will keep on trying
|
||||||
|
rm "${service_link}"
|
||||||
|
fi
|
||||||
|
eend $retval "Failed to start ${name:-$RC_SVCNAME}"
|
||||||
}
|
}
|
||||||
|
|
||||||
runit_stop()
|
runit_stop()
|
||||||
|
|||||||
@@ -22,6 +22,7 @@
|
|||||||
#include <time.h>
|
#include <time.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
#include <utmp.h>
|
||||||
#include <utmpx.h>
|
#include <utmpx.h>
|
||||||
#include <pwd.h>
|
#include <pwd.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ rc_misc_c = files([
|
|||||||
'rc-misc.c',
|
'rc-misc.c',
|
||||||
])
|
])
|
||||||
|
|
||||||
rc_plugin_c = ([
|
rc_plugin_c = files([
|
||||||
'rc-plugin.c',
|
'rc-plugin.c',
|
||||||
])
|
])
|
||||||
|
|
||||||
@@ -53,7 +53,7 @@ executable('openrc-run',
|
|||||||
rc_selinux_c, version_h],
|
rc_selinux_c, version_h],
|
||||||
c_args : [cc_audit_flags, cc_branding_flags, cc_pam_flags, cc_selinux_flags],
|
c_args : [cc_audit_flags, cc_branding_flags, cc_pam_flags, cc_selinux_flags],
|
||||||
link_with: [libeinfo, librc],
|
link_with: [libeinfo, librc],
|
||||||
dependencies: [dl_dep, libpam, selinux_dep, util_dep],
|
dependencies: [audit_dep, dl_dep, libpam, libpam_misc, selinux_dep, util_dep],
|
||||||
include_directories: [incdir, einfo_incdir, rc_incdir],
|
include_directories: [incdir, einfo_incdir, rc_incdir],
|
||||||
install: true,
|
install: true,
|
||||||
install_dir: sbindir)
|
install_dir: sbindir)
|
||||||
@@ -88,7 +88,7 @@ executable('runscript',
|
|||||||
rc_selinux_c, version_h],
|
rc_selinux_c, version_h],
|
||||||
c_args : [cc_audit_flags, cc_branding_flags, cc_pam_flags, cc_selinux_flags],
|
c_args : [cc_audit_flags, cc_branding_flags, cc_pam_flags, cc_selinux_flags],
|
||||||
link_with: [libeinfo, librc],
|
link_with: [libeinfo, librc],
|
||||||
dependencies: [dl_dep, libpam, util_dep, selinux_dep],
|
dependencies: [audit_dep, dl_dep, libpam, util_dep, selinux_dep],
|
||||||
include_directories: [incdir, einfo_incdir, rc_incdir],
|
include_directories: [incdir, einfo_incdir, rc_incdir],
|
||||||
install: true,
|
install: true,
|
||||||
install_dir: sbindir)
|
install_dir: sbindir)
|
||||||
|
|||||||
@@ -20,6 +20,7 @@
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
#include <inttypes.h>
|
||||||
|
|
||||||
#include "einfo.h"
|
#include "einfo.h"
|
||||||
#include "queue.h"
|
#include "queue.h"
|
||||||
@@ -128,12 +129,12 @@ static char *get_uptime(const char *service)
|
|||||||
}
|
}
|
||||||
if (diff_days > 0)
|
if (diff_days > 0)
|
||||||
xasprintf(&uptime,
|
xasprintf(&uptime,
|
||||||
"%ld day(s) %02ld:%02ld:%02ld (%s)",
|
"%"PRId64" day(s) %02"PRId64":%02"PRId64":%02"PRId64" (%s)",
|
||||||
diff_days, diff_hours, diff_mins, diff_secs,
|
diff_days, diff_hours, diff_mins, diff_secs,
|
||||||
start_count);
|
start_count);
|
||||||
else
|
else
|
||||||
xasprintf(&uptime,
|
xasprintf(&uptime,
|
||||||
"%02ld:%02ld:%02ld (%s)",
|
"%02"PRId64":%02"PRId64":%02"PRId64" (%s)",
|
||||||
diff_hours, diff_mins, diff_secs, start_count);
|
diff_hours, diff_mins, diff_secs, start_count);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ os="$1"
|
|||||||
net="$2"
|
net="$2"
|
||||||
rc_libexecdir="$3"
|
rc_libexecdir="$3"
|
||||||
sysconfdir="$4"
|
sysconfdir="$4"
|
||||||
|
sysvinit="$5"
|
||||||
|
|
||||||
init_d_dir="${sysconfdir}/init.d"
|
init_d_dir="${sysconfdir}/init.d"
|
||||||
leveldir="${sysconfdir}/runlevels"
|
leveldir="${sysconfdir}/runlevels"
|
||||||
@@ -90,5 +91,11 @@ if ! test -d "${DESTDIR}${shutdowndir}"; then
|
|||||||
ln -snf "${init_d_dir}/$x" "${DESTDIR}${shutdowndir}/$x"
|
ln -snf "${init_d_dir}/$x" "${DESTDIR}${shutdowndir}/$x"
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
if test "${sysvinit}" = yes && test "${os}" = Linux; then \
|
||||||
|
for x in tty1 tty2 tty3 tty4 tty5 tty6; do
|
||||||
|
ln -snf "${init_d_dir}/agetty" "${DESTDIR}/${init_d_dir}/agetty.$x"
|
||||||
|
ln -snf "${init_d_dir}/agetty.$x" "${DESTDIR}/${defaultdir}/agetty.$x"
|
||||||
|
done;
|
||||||
|
fi
|
||||||
|
|
||||||
ln -snf "${rc_libexecdir}"/sh/functions.sh "${DESTDIR}/${init_d_dir}"
|
ln -snf "${rc_libexecdir}"/sh/functions.sh "${DESTDIR}/${init_d_dir}"
|
||||||
|
|||||||
Reference in New Issue
Block a user