Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions init.d/mount.in
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,7 @@ generate()
case "$fsopts" in
*noauto*) ;;
*)
local name="${fs#/}"
name="$(echo $name | sed 's#/#.#g')"
local name="$(_mountpoint_to_mountname $fs)"
einfo ln -snf mount "${svcpath}/${name}"
rc=$?
[ $rc -ne 0 ] && break
Expand Down
5 changes: 5 additions & 0 deletions sh/functions.sh.in
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,11 @@ _sanitize_path()
echo "$path"
}

_mountpoint_to_mountname()
{
echo ${*#/} | sed 's#/#.#g'
}

# Allow our scripts to support zsh
if [ -n "$ZSH_VERSION" ]; then
emulate sh
Expand Down
13 changes: 13 additions & 0 deletions sh/gendepends.sh.in
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,19 @@ provide() {
keyword() {
[ -n "$*" ] && echo "$RC_SVCNAME keyword $*" >&3
}
path() {
# Resolve each entry into an ineed line on a mountpoint
[ -n "$*" ] || return
for PATHNAME in *; do
# We loop here because some systems (QNX) can have multiple fs's backing a mountpoint
# The sed line chops off the
df -P $PATHNAME | sed 1d | while read one two three four five six; do
# borrowed from mount's generate: should go somewhere higher up as a function
local name="$(_mountpoint_to_mountname $six)"
[ -n "$name" ] && echo "$RC_SVCNAME ineed mount.$name" >&3
done
done # for PATHNAME
}
depend() {
:
}
Expand Down
5 changes: 4 additions & 1 deletion sh/openrc-run.sh.in
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,9 @@ provide() {
keyword() {
[ -n "$*" ] && echo "keyword $*"
}
path() {
[ -n "$*" ] && echo "path $*"
}

# Describe the init script to the user
describe()
Expand Down Expand Up @@ -217,7 +220,7 @@ for _cmd; do
break
fi
done

# Load our script
sourcex "$RC_SERVICE"

Expand Down