Compare commits
8 Commits
0.17
...
new-netmou
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8591a0ea73 | ||
|
|
6a42298257 | ||
|
|
f69833a1e1 | ||
|
|
eeadca0b8a | ||
|
|
dde339070b | ||
|
|
1736be3bc3 | ||
|
|
a36a635b01 | ||
|
|
9310ccc06b |
@@ -1,3 +1,3 @@
|
||||
NAME= openrc
|
||||
VERSION= 0.17
|
||||
VERSION= 0.18
|
||||
PKG= ${NAME}-${VERSION}
|
||||
|
||||
@@ -4,11 +4,24 @@
|
||||
|
||||
description="Mounts network shares according to /etc/fstab."
|
||||
|
||||
get_fs_services()
|
||||
{
|
||||
local fsclient fstype list=$(ls $RC_LIBEXECDIR/netfs/*) services
|
||||
local x
|
||||
for x in $list; do
|
||||
fstype=${x##*/}
|
||||
fstabinfo -q -t ${fstype} && services="${services} $(cat x)"
|
||||
done
|
||||
printf "%s\n" $services
|
||||
}
|
||||
|
||||
depend()
|
||||
{
|
||||
config /etc/fstab
|
||||
use afc-client amd nfsclient autofs openvpn
|
||||
use dns
|
||||
local fs_services ="$(get_fs_services)"
|
||||
[ -n "$fs_services" ] && use $fs_services
|
||||
keyword -jail -prefix -systemd-nspawn -vserver -lxc
|
||||
}
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ start()
|
||||
if yesno "${RC_GOINGDOWN}"; then
|
||||
rc=0
|
||||
fi
|
||||
eend $rc "Unable to create $RC_SVCDIR/cache"
|
||||
eend $rc "Unable to create $RC_LIBEXECDIR/cache"
|
||||
return $rc
|
||||
fi
|
||||
fi
|
||||
|
||||
23
sh/tmpfiles.sh.in
Executable file → Normal file
23
sh/tmpfiles.sh.in
Executable file → Normal file
@@ -53,10 +53,18 @@ relabel() {
|
||||
done
|
||||
}
|
||||
|
||||
splitpath() {
|
||||
local path=$1
|
||||
while [ -n "$path" ]; do
|
||||
echo $path
|
||||
path=${path%/*}
|
||||
done
|
||||
}
|
||||
|
||||
_restorecon() {
|
||||
local path=$1
|
||||
if [ -x /sbin/restorecon ]; then
|
||||
dryrun_or_real restorecon -F "$path"
|
||||
dryrun_or_real restorecon -F $(splitpath "$path")
|
||||
fi
|
||||
}
|
||||
|
||||
@@ -122,6 +130,7 @@ _d() {
|
||||
|
||||
if [ ! -d "$path" ]; then
|
||||
dryrun_or_real mkdir -p "$path" 2>/dev/null
|
||||
_restorecon "$path"
|
||||
dryrun_or_real $CHECKPATH -dq -m "$mode" -o "$uid:$gid" "$path"
|
||||
fi
|
||||
}
|
||||
@@ -137,10 +146,18 @@ _D() {
|
||||
|
||||
if [ $CREATE -gt 0 ]; then
|
||||
dryrun_or_real mkdir -p "$path" 2>/dev/null
|
||||
_restorecon "$path"
|
||||
dryrun_or_real $CHECKPATH -Dq -m "$mode" -o "$uid:$gid" "$path"
|
||||
fi
|
||||
}
|
||||
|
||||
_v() {
|
||||
# Create a subvolume if the path does not exist yet and the file system
|
||||
# supports this (btrfs). Otherwise create a normal directory.
|
||||
# TODO: Implement btrfs subvol creation.
|
||||
_d "$@"
|
||||
}
|
||||
|
||||
_L() {
|
||||
# Create a symlink if it doesn't exist yet
|
||||
local path=$1 mode=$2 uid=$3 gid=$4 age=$5 arg=$6
|
||||
@@ -336,7 +353,7 @@ for FILE in $tmpfiles_d ; do
|
||||
|
||||
# whine about invalid entries
|
||||
case $cmd in
|
||||
f|F|w|d|D|p|L|c|C|b|x|X|r|R|z|Z) ;;
|
||||
f|F|w|d|D|v|p|L|c|C|b|x|X|r|R|z|Z) ;;
|
||||
*) warninvalid ; continue ;;
|
||||
esac
|
||||
|
||||
@@ -344,7 +361,7 @@ for FILE in $tmpfiles_d ; do
|
||||
if [ "$mode" = '-' -o "$mode" = '' ]; then
|
||||
case "$cmd" in
|
||||
p|f|F) mode=0644 ;;
|
||||
d|D) mode=0755 ;;
|
||||
d|D|v) mode=0755 ;;
|
||||
C|z|Z|x|r|R|L) ;;
|
||||
esac
|
||||
fi
|
||||
|
||||
@@ -347,7 +347,7 @@ get_regex(const char *string)
|
||||
|
||||
#include "_usage.h"
|
||||
#define extraopts "[mount1] [mount2] ..."
|
||||
#define getoptstring "f:F:n:N:o:O:p:P:ist" getoptstring_COMMON
|
||||
#define getoptstring "f:F:n:N:o:O:p:P:iste:E:" getoptstring_COMMON
|
||||
static const struct option longopts[] = {
|
||||
{ "fstype-regex", 1, NULL, 'f'},
|
||||
{ "skip-fstype-regex", 1, NULL, 'F'},
|
||||
|
||||
@@ -66,6 +66,7 @@ static const char *const env_whitelist[] = {
|
||||
"LC_MONETARY", "LC_MESSAGES", "LC_PAPER", "LC_NAME", "LC_ADDRESS",
|
||||
"LC_TELEPHONE", "LC_MEASUREMENT", "LC_IDENTIFICATION", "LC_ALL",
|
||||
"IN_HOTPLUG", "IN_BACKGROUND", "RC_INTERFACE_KEEP_CONFIG",
|
||||
"EERROR_QUIET", "EINFO_QUIET",
|
||||
NULL
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user