Compare commits
6 Commits
openrc-0.6
...
openrc-0.6
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
900d54b0fc | ||
|
|
84750f5722 | ||
|
|
f8f03bdbbf | ||
|
|
80d5f7d27b | ||
|
|
449080e145 | ||
|
|
062223a5df |
@@ -1,3 +1,3 @@
|
|||||||
NAME= openrc
|
NAME= openrc
|
||||||
VERSION= 0.6.6
|
VERSION= 0.6.8
|
||||||
PKG= ${NAME}-${VERSION}
|
PKG= ${NAME}-${VERSION}
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ start()
|
|||||||
local myneed= myuse= pmap="portmap" nfsmounts=
|
local myneed= myuse= pmap="portmap" nfsmounts=
|
||||||
[ -x @SYSCONFDIR@/init.d/rpcbind ] && pmap="rpcbind"
|
[ -x @SYSCONFDIR@/init.d/rpcbind ] && pmap="rpcbind"
|
||||||
|
|
||||||
local x= fs=
|
local x= fs= rc=
|
||||||
for x in $net_fs_list; do
|
for x in $net_fs_list; do
|
||||||
case "$x" in
|
case "$x" in
|
||||||
nfs|nfs4)
|
nfs|nfs4)
|
||||||
@@ -65,7 +65,12 @@ start()
|
|||||||
|
|
||||||
ebegin "Mounting network filesystems"
|
ebegin "Mounting network filesystems"
|
||||||
mount -at $fs
|
mount -at $fs
|
||||||
ewend $? "Could not mount all network filesystems"
|
rc=$?
|
||||||
|
if [ "$RC_UNAME" = Linux ]; then
|
||||||
|
mount -a -O _netdev
|
||||||
|
rc=$?
|
||||||
|
fi
|
||||||
|
ewend $rc "Could not mount all network filesystems"
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -93,5 +98,9 @@ stop()
|
|||||||
retval=$?
|
retval=$?
|
||||||
|
|
||||||
eoutdent
|
eoutdent
|
||||||
|
if [ "$RC_UNAME" = Linux ]; then
|
||||||
|
umount -a -O _netdev
|
||||||
|
retval=$?
|
||||||
|
fi
|
||||||
eend $retval "Failed to unmount network filesystems"
|
eend $retval "Failed to unmount network filesystems"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,10 +3,14 @@
|
|||||||
|
|
||||||
wpa_supplicant_depend()
|
wpa_supplicant_depend()
|
||||||
{
|
{
|
||||||
if [ -x /usr/sbin/wpa_supplicant ]; then
|
wpas=/usr/sbin/wpa_supplicant
|
||||||
program start /usr/sbin/wpa_supplicant
|
[ -x ${wpas} ] || wpas=/sbin/wpa_supplicant
|
||||||
else
|
if [ -x ${wpas} ]; then
|
||||||
program start /sbin/wpa_supplicant
|
program start ${wpas}
|
||||||
|
# bug 345281: if wpa_supplicant is built w/ USE=dbus, we need to start
|
||||||
|
# dbus before we can start wpa_supplicant.
|
||||||
|
${wpas} -h |grep DBus -sq
|
||||||
|
[ $? -eq 0 ] && need dbus
|
||||||
fi
|
fi
|
||||||
after macnet plug
|
after macnet plug
|
||||||
before interface
|
before interface
|
||||||
|
|||||||
@@ -6,6 +6,17 @@
|
|||||||
# This basically mounts $RC_SVCDIR as a ramdisk.
|
# This basically mounts $RC_SVCDIR as a ramdisk.
|
||||||
# The tricky part is finding something our kernel supports
|
# The tricky part is finding something our kernel supports
|
||||||
# tmpfs and ramfs are easy, so force one or the other.
|
# tmpfs and ramfs are easy, so force one or the other.
|
||||||
|
svcdir_restorecon()
|
||||||
|
{
|
||||||
|
local rc=0
|
||||||
|
if [ -x /usr/sbin/selinuxenabled -a -c /selinux/null ] &&
|
||||||
|
selinuxenabled; then
|
||||||
|
restorecon $RC_SVCDIR
|
||||||
|
rc=$?
|
||||||
|
fi
|
||||||
|
return $rc
|
||||||
|
}
|
||||||
|
|
||||||
mount_svcdir()
|
mount_svcdir()
|
||||||
{
|
{
|
||||||
# mount from fstab if we can
|
# mount from fstab if we can
|
||||||
@@ -16,8 +27,12 @@ mount_svcdir()
|
|||||||
|
|
||||||
# Some buggy kernels report tmpfs even when not present :(
|
# Some buggy kernels report tmpfs even when not present :(
|
||||||
if grep -Eq "[[:space:]]+tmpfs$" /proc/filesystems; then
|
if grep -Eq "[[:space:]]+tmpfs$" /proc/filesystems; then
|
||||||
mount -n -t tmpfs $fsopts,mode=755,size=${svcsize}k \
|
local tmpfsopts="${fsopts},mode=755,size=${svcsize}k"
|
||||||
rc-svcdir "$RC_SVCDIR" && return 0
|
mount -n -t tmpfs $tmpfsopts rc-svcdir "$RC_SVCDIR"
|
||||||
|
if [ $? -eq 0 ]; then
|
||||||
|
svcdir_restorecon
|
||||||
|
[ $? -eq 0 ] && return 0
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if grep -Eq "[[:space:]]+ramfs$" /proc/filesystems; then
|
if grep -Eq "[[:space:]]+ramfs$" /proc/filesystems; then
|
||||||
@@ -38,6 +53,10 @@ mount_svcdir()
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
mount -n -t "$fs" $fsopts rc-svcdir "$RC_SVCDIR"
|
mount -n -t "$fs" $fsopts rc-svcdir "$RC_SVCDIR"
|
||||||
|
if [ $? -eq 0 ]; then
|
||||||
|
svcdir_restorecon
|
||||||
|
[ $? -eq 0 ] && return 0
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
. "$RC_LIBEXECDIR"/sh/functions.sh
|
. "$RC_LIBEXECDIR"/sh/functions.sh
|
||||||
|
|||||||
@@ -350,6 +350,8 @@ svc_exec(const char *arg1, const char *arg2)
|
|||||||
size_t bytes;
|
size_t bytes;
|
||||||
bool prefixed = false;
|
bool prefixed = false;
|
||||||
int slave_tty;
|
int slave_tty;
|
||||||
|
sigset_t sigchldmask;
|
||||||
|
sigset_t oldmask;
|
||||||
|
|
||||||
/* Setup our signal pipe */
|
/* Setup our signal pipe */
|
||||||
if (pipe(signal_pipe) == -1)
|
if (pipe(signal_pipe) == -1)
|
||||||
@@ -439,10 +441,17 @@ svc_exec(const char *arg1, const char *arg2)
|
|||||||
}
|
}
|
||||||
|
|
||||||
free(buffer);
|
free(buffer);
|
||||||
|
|
||||||
|
sigemptyset (&sigchldmask);
|
||||||
|
sigaddset (&sigchldmask, SIGCHLD);
|
||||||
|
sigprocmask (SIG_BLOCK, &sigchldmask, &oldmask);
|
||||||
|
|
||||||
close(signal_pipe[0]);
|
close(signal_pipe[0]);
|
||||||
close(signal_pipe[1]);
|
close(signal_pipe[1]);
|
||||||
signal_pipe[0] = signal_pipe[1] = -1;
|
signal_pipe[0] = signal_pipe[1] = -1;
|
||||||
|
|
||||||
|
sigprocmask (SIG_SETMASK, &oldmask, NULL);
|
||||||
|
|
||||||
if (master_tty >= 0) {
|
if (master_tty >= 0) {
|
||||||
/* Why did we do this? */
|
/* Why did we do this? */
|
||||||
/* signal (SIGWINCH, SIG_IGN); */
|
/* signal (SIGWINCH, SIG_IGN); */
|
||||||
|
|||||||
Reference in New Issue
Block a user