Compare commits
6 Commits
openrc-0.9
...
openrc-0.9
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a9738a8508 | ||
|
|
5cb985b6cc | ||
|
|
e2f1464f47 | ||
|
|
5df9dc1af5 | ||
|
|
b42ab3b2f4 | ||
|
|
5ed4d084d9 |
@@ -1,3 +1,3 @@
|
||||
NAME= openrc
|
||||
VERSION= 0.9.2
|
||||
VERSION= 0.9.3
|
||||
PKG= ${NAME}-${VERSION}
|
||||
|
||||
@@ -5,6 +5,24 @@
|
||||
: ${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,30 +91,6 @@ 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,6 +387,7 @@ 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;
|
||||
@@ -457,7 +458,10 @@ mountinfo(int argc, char **argv)
|
||||
if (argv[optind][0] != '/')
|
||||
eerrorx("%s: `%s' is not a mount point",
|
||||
argv[0], argv[optind]);
|
||||
rc_stringlist_add(args.mounts, 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);
|
||||
}
|
||||
nodes = find_mounts(&args);
|
||||
rc_stringlist_free(args.mounts);
|
||||
|
||||
@@ -1103,7 +1103,6 @@ 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 */
|
||||
|
||||
Reference in New Issue
Block a user