Compare commits
2 Commits
openrc-0.9
...
openrc-0.9
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
02e7df3f92 | ||
|
|
a4ecc0eedc |
@@ -1,3 +1,3 @@
|
||||
NAME= openrc
|
||||
VERSION= 0.9.3
|
||||
VERSION= 0.9.1
|
||||
PKG= ${NAME}-${VERSION}
|
||||
|
||||
@@ -12,7 +12,7 @@ depend()
|
||||
|
||||
start()
|
||||
{
|
||||
if [ -L /etc/mtab ]
|
||||
if [ -l /etc/mtab ]
|
||||
then
|
||||
einfo "Skipping mtab update (mtab is a symbolic link)"
|
||||
return 0
|
||||
|
||||
@@ -5,24 +5,6 @@
|
||||
: ${CONSOLE:=/dev/console}
|
||||
: ${RC_LIBEXECDIR:=@LIBEXECDIR@}
|
||||
|
||||
# Mount tmpfs on /run when directory exists.
|
||||
# /run is a new directory for storing volatile runtime data.
|
||||
# Read more about /run at https://lwn.net/Articles/436012
|
||||
if [ -d /run ]; then
|
||||
if mountinfo -q /run; then
|
||||
einfo "/run is already mounted, skipping"
|
||||
else
|
||||
ebegin "Mounting /run"
|
||||
if ! fstabinfo --mount /run; then
|
||||
mount -t tmpfs -o mode=0755,nosuid,nodev tmpfs /run
|
||||
fi
|
||||
eend $?
|
||||
fi
|
||||
checkpath -d -m 0775 -o root:uucp /run/lock
|
||||
elif [ -e /run ]; then
|
||||
einfo "Unable to mount /run since it is not a directory"
|
||||
fi
|
||||
|
||||
if [ -e "$RC_LIBEXECDIR"/console/unicode ]; then
|
||||
termencoding="%G"
|
||||
kmode="-u"
|
||||
|
||||
@@ -91,6 +91,30 @@ if $mountproc; then
|
||||
eend $?
|
||||
fi
|
||||
|
||||
# Mount tmpfs on /run when directory exists.
|
||||
# /run is a new directory for storing volatile runtime data.
|
||||
# Read more about /run at https://lwn.net/Articles/436012
|
||||
if [ -d /run ]; then
|
||||
if mountinfo -q /run; then
|
||||
einfo "/run is already mounted, skipping"
|
||||
else
|
||||
ebegin "Mounting /run"
|
||||
if ! fstabinfo --mount /run; then
|
||||
mount -t tmpfs -o mode=0755,nosuid,nodev tmpfs /run
|
||||
fi
|
||||
eend $?
|
||||
fi
|
||||
if [ ! -d /run/lock ]; then
|
||||
mkdir /run/lock
|
||||
fi
|
||||
if [ -d /run/lock ]; then
|
||||
chown root:uucp /run/lock
|
||||
chmod 0775 /run/lock
|
||||
fi
|
||||
elif [ -e /run ]; then
|
||||
einfo "Unable to mount /run since it is not a directory"
|
||||
fi
|
||||
|
||||
# Try to mount xenfs as early as possible, otherwise rc_sys() will always
|
||||
# return RC_SYS_XENU and will think that we are in a domU while it's not.
|
||||
if grep -Eq "[[:space:]]+xenfs$" /proc/filesystems; then
|
||||
|
||||
@@ -387,7 +387,6 @@ mountinfo(int argc, char **argv)
|
||||
regex_t *skip_point_regex = NULL;
|
||||
RC_STRINGLIST *nodes;
|
||||
RC_STRING *s;
|
||||
char real_path[PATH_MAX + 1];
|
||||
int opt;
|
||||
int result;
|
||||
bool quiet;
|
||||
@@ -458,10 +457,7 @@ mountinfo(int argc, char **argv)
|
||||
if (argv[optind][0] != '/')
|
||||
eerrorx("%s: `%s' is not a mount point",
|
||||
argv[0], argv[optind]);
|
||||
if (realpath(argv[optind++], real_path) == NULL) {
|
||||
eerrorx("%s: realpath() failed: %s", argv[0], strerror(errno));
|
||||
}
|
||||
rc_stringlist_add(args.mounts, real_path);
|
||||
rc_stringlist_add(args.mounts, argv[optind++]);
|
||||
}
|
||||
nodes = find_mounts(&args);
|
||||
rc_stringlist_free(args.mounts);
|
||||
|
||||
@@ -1103,6 +1103,7 @@ runscript(int argc, char **argv)
|
||||
char *save = NULL;
|
||||
char pidstr[10];
|
||||
size_t l = 0, ll;
|
||||
const char *file;
|
||||
struct stat stbuf;
|
||||
|
||||
/* Show help if insufficient args */
|
||||
@@ -1345,7 +1346,7 @@ runscript(int argc, char **argv)
|
||||
strerror(errno));
|
||||
unhotplug();
|
||||
} else
|
||||
retval = svc_exec(optarg, NULL);
|
||||
svc_exec(optarg, NULL);
|
||||
|
||||
/* We should ensure this list is empty after
|
||||
* an action is done */
|
||||
|
||||
Reference in New Issue
Block a user