summaryrefslogtreecommitdiff
path: root/package/base-files/src
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2014-05-06 14:36:49 +0200
committerWaldemar Brodkorb <wbx@openadk.org>2014-05-06 14:36:49 +0200
commitec7e1c28df5bbb5b45540034d77fd2ff690f39f2 (patch)
treee26a993f2cfa7b93849f759f38c1348520931b50 /package/base-files/src
parentaffb6a34ec435daa4b7d3005dffb1b5086f22875 (diff)
use global vars
Diffstat (limited to 'package/base-files/src')
-rwxr-xr-xpackage/base-files/src/etc/mdev/fs24
1 files changed, 12 insertions, 12 deletions
diff --git a/package/base-files/src/etc/mdev/fs b/package/base-files/src/etc/mdev/fs
index afbcaffff..4f360216a 100755
--- a/package/base-files/src/etc/mdev/fs
+++ b/package/base-files/src/etc/mdev/fs
@@ -8,39 +8,39 @@ fi
# fstab check
adk_check() {
- grep -v "^#" /etc/fstab | grep -q "^/dev/${1}[[:blank:]]"
+ grep -v "^#" /etc/fstab | grep -q "^/dev/${MDEV}[[:blank:]]"
if [ $? -ne 0 ];then
- logger -t fs -s "Disk ${1} not registered in /etc/fstab"
+ logger -t fs -s "Disk ${MDEV} not registered in /etc/fstab"
exit 1
fi
}
# filesystem check
adk_fsck() {
- [ -x /usr/sbin/fsck.$2 ] && {
- logger -t fs -s "Checking filesystem on ${1} with ${2}"
- fsck -p -t ${2} ${1}
+ [ -x /usr/sbin/fsck.$fs ] && {
+ logger -t fs -s "Checking filesystem on ${MDEV} with $fs"
+ fsck -p -t $fs ${MDEV}
}
}
# mount filesystem
adk_mount() {
- mkdir -p $3 >/dev/null 2>&1
- grep $2 /proc/filesystems >/dev/null 2>&1
+ mkdir -p $mnt >/dev/null 2>&1
+ grep $procfs /proc/filesystems >/dev/null 2>&1
if [ $? -eq 0 ];then
- logger -t fs -s "Mounting /dev/${1} to $mnt"
+ logger -t fs -s "Mounting /dev/${MDEV} to $mnt"
mount $mnt
else
- logger -t fs -s "Required filesystem $2 not available"
+ logger -t fs -s "Required filesystem $procfs not available"
fi
}
case "${ACTION}" in
add)
logger -t fs -s "Device ${MDEV} added to the system"
- adk_check ${MDEV}
- adk_fsck ${MDEV} $fs
- adk_mount ${MDEV} $procfs $mnt
+ adk_check
+ adk_fsck
+ adk_mount
;;
esac
exit 0