1 |
commit: 7ec2f54db0560084877ad7e5d0dd0fdea100be1d |
2 |
Author: William Hubbs <williamh <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Sep 5 18:28:34 2011 +0000 |
4 |
Commit: William Hubbs <williamh <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Sep 5 18:28:34 2011 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/udev-gentoo-scripts.git;a=commit;h=7ec2f54d |
7 |
|
8 |
Remove the shell-compat-addon helper |
9 |
|
10 |
This helper was used by the baselayout-1 addons. It is no longer needed |
11 |
since they have been removed. |
12 |
|
13 |
--- |
14 |
Makefile | 1 - |
15 |
helpers/shell-compat-addon.sh | 71 ----------------------------------------- |
16 |
2 files changed, 0 insertions(+), 72 deletions(-) |
17 |
|
18 |
diff --git a/Makefile b/Makefile |
19 |
index 115763f..67ef236 100644 |
20 |
--- a/Makefile |
21 |
+++ b/Makefile |
22 |
@@ -17,7 +17,6 @@ HELPERS = \ |
23 |
helpers/write_root_link_rule |
24 |
|
25 |
HELPERS_NOEXE = \ |
26 |
- helpers/shell-compat-addon.sh \ |
27 |
helpers/shell-compat-KV.sh |
28 |
|
29 |
all: |
30 |
|
31 |
diff --git a/helpers/shell-compat-addon.sh b/helpers/shell-compat-addon.sh |
32 |
deleted file mode 100644 |
33 |
index efe7726..0000000 |
34 |
--- a/helpers/shell-compat-addon.sh |
35 |
+++ /dev/null |
36 |
@@ -1,71 +0,0 @@ |
37 |
-# Copyright 1999-2010 Gentoo Foundation |
38 |
-# Distributed under the terms of the GNU General Public License v2 |
39 |
- |
40 |
-# functions that may not be defined, but are used by the udev-start and udev-stop addon |
41 |
-# used by baselayout-1 and openrc before version 0.4.0 |
42 |
- |
43 |
-cmd_exist() |
44 |
-{ |
45 |
- type "$1" >/dev/null 2>&1 |
46 |
-} |
47 |
- |
48 |
-# does not exist in baselayout-1, does exist in openrc |
49 |
-if ! cmd_exist yesno; then |
50 |
- yesno() { |
51 |
- [ -z "$1" ] && return 1 |
52 |
- case "$1" in |
53 |
- yes|Yes|YES) return 0 ;; |
54 |
- esac |
55 |
- return 1 |
56 |
- } |
57 |
-fi |
58 |
- |
59 |
-# does not exist in baselayout-1, does exist in openrc |
60 |
-# |
61 |
-# mountinfo <path> |
62 |
-# check if some filesystem is mounted at mountpoint <path> |
63 |
-# |
64 |
-# return value: |
65 |
-# 0 filesystem is mounted at <path> |
66 |
-# 1 no filesystem is mounted exactly at <path> |
67 |
-if ! cmd_exist mountinfo; then |
68 |
- mountinfo() { |
69 |
- [ "$1" = "-q" ] && shift |
70 |
- local dir="$1" |
71 |
- |
72 |
- # check if entry is in /proc/mounts |
73 |
- local ret=$(gawk 'BEGIN { found="false"; } |
74 |
- $1 ~ "^#" { next } |
75 |
- $2 == "'$dir'" { found="true"; } |
76 |
- END { print found; } |
77 |
- ' /proc/mounts) |
78 |
- |
79 |
- "${ret}" |
80 |
- } |
81 |
-fi |
82 |
- |
83 |
-# does not exist in baselayout-1, does exist in openrc |
84 |
-# |
85 |
-# used syntax: fstabinfo --mount /dev |
86 |
-# it should mount /dev if an entry exists in /etc/fstab |
87 |
-# |
88 |
-# return value: |
89 |
-# 0 mount succeeded |
90 |
-# 1 mount failed or no entry exists |
91 |
-# |
92 |
-if ! cmd_exist fstabinfo; then |
93 |
- fstabinfo() { |
94 |
- [ "$1" = "--mount" ] || return 1 |
95 |
- local dir="$2" |
96 |
- |
97 |
- # RC_USE_FSTAB does only exist in baselayout-1 |
98 |
- # this emulation is only needed on bl-1, so check always |
99 |
- yesno "${RC_USE_FSTAB}" || return 1 |
100 |
- |
101 |
- # no need to check fstab, mount does this already for us |
102 |
- |
103 |
- # try mounting - better first check fstab and then mount without surpressing errors |
104 |
- mount -n "${dir}" 2>/dev/null |
105 |
- return $? |
106 |
- } |
107 |
-fi |