diff options
author | 2011-09-05 13:28:34 -0500 | |
---|---|---|
committer | 2011-09-05 13:28:34 -0500 | |
commit | 7ec2f54db0560084877ad7e5d0dd0fdea100be1d (patch) | |
tree | f5ceb6e742b6db61687410a4087ab361a2ce3202 | |
parent | Remove baselayout-1 addons (diff) | |
download | udev-gentoo-scripts-7ec2f54db0560084877ad7e5d0dd0fdea100be1d.tar.gz udev-gentoo-scripts-7ec2f54db0560084877ad7e5d0dd0fdea100be1d.tar.bz2 udev-gentoo-scripts-7ec2f54db0560084877ad7e5d0dd0fdea100be1d.zip |
Remove the shell-compat-addon helper
This helper was used by the baselayout-1 addons. It is no longer needed
since they have been removed.
-rw-r--r-- | Makefile | 1 | ||||
-rw-r--r-- | helpers/shell-compat-addon.sh | 71 |
2 files changed, 0 insertions, 72 deletions
@@ -17,7 +17,6 @@ HELPERS = \ helpers/write_root_link_rule HELPERS_NOEXE = \ - helpers/shell-compat-addon.sh \ helpers/shell-compat-KV.sh all: diff --git a/helpers/shell-compat-addon.sh b/helpers/shell-compat-addon.sh deleted file mode 100644 index efe7726..0000000 --- a/helpers/shell-compat-addon.sh +++ /dev/null @@ -1,71 +0,0 @@ -# Copyright 1999-2010 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -# functions that may not be defined, but are used by the udev-start and udev-stop addon -# used by baselayout-1 and openrc before version 0.4.0 - -cmd_exist() -{ - type "$1" >/dev/null 2>&1 -} - -# does not exist in baselayout-1, does exist in openrc -if ! cmd_exist yesno; then - yesno() { - [ -z "$1" ] && return 1 - case "$1" in - yes|Yes|YES) return 0 ;; - esac - return 1 - } -fi - -# does not exist in baselayout-1, does exist in openrc -# -# mountinfo <path> -# check if some filesystem is mounted at mountpoint <path> -# -# return value: -# 0 filesystem is mounted at <path> -# 1 no filesystem is mounted exactly at <path> -if ! cmd_exist mountinfo; then - mountinfo() { - [ "$1" = "-q" ] && shift - local dir="$1" - - # check if entry is in /proc/mounts - local ret=$(gawk 'BEGIN { found="false"; } - $1 ~ "^#" { next } - $2 == "'$dir'" { found="true"; } - END { print found; } - ' /proc/mounts) - - "${ret}" - } -fi - -# does not exist in baselayout-1, does exist in openrc -# -# used syntax: fstabinfo --mount /dev -# it should mount /dev if an entry exists in /etc/fstab -# -# return value: -# 0 mount succeeded -# 1 mount failed or no entry exists -# -if ! cmd_exist fstabinfo; then - fstabinfo() { - [ "$1" = "--mount" ] || return 1 - local dir="$2" - - # RC_USE_FSTAB does only exist in baselayout-1 - # this emulation is only needed on bl-1, so check always - yesno "${RC_USE_FSTAB}" || return 1 - - # no need to check fstab, mount does this already for us - - # try mounting - better first check fstab and then mount without surpressing errors - mount -n "${dir}" 2>/dev/null - return $? - } -fi |