summaryrefslogtreecommitdiff
path: root/community-testing/vhba-module/vhba-module.install
diff options
context:
space:
mode:
authorroot <root@rshg054.dnsready.net>2012-08-01 00:01:57 +0000
committerroot <root@rshg054.dnsready.net>2012-08-01 00:01:57 +0000
commita71961a43ef48f47d3575915f63099308a18a263 (patch)
tree7cff98e17a13de6beae6d0a56c0d1bf75a74fb5a /community-testing/vhba-module/vhba-module.install
parent5b3474881a154216b47c6e154552ee5f9c68c509 (diff)
Wed Aug 1 00:01:57 UTC 2012
Diffstat (limited to 'community-testing/vhba-module/vhba-module.install')
-rw-r--r--community-testing/vhba-module/vhba-module.install15
1 files changed, 7 insertions, 8 deletions
diff --git a/community-testing/vhba-module/vhba-module.install b/community-testing/vhba-module/vhba-module.install
index 86ad03a5e..3704282a7 100644
--- a/community-testing/vhba-module/vhba-module.install
+++ b/community-testing/vhba-module/vhba-module.install
@@ -1,21 +1,20 @@
-post_upgrade() {
- ! grep -q 'cdemu' /etc/group && groupadd cdemu
+_updatemod() {
echo " > Updating module dependencies..."
EXTRAMODULES='extramodules-3.5-ARCH'
depmod $(cat /usr/lib/modules/$EXTRAMODULES/version)
}
-
post_install() {
- echo " > Adding 'cdemu' group"
- ! grep -q 'cdemu' /etc/group && groupadd cdemu
- echo " > Add 'vhba' to your modules array to autoload it"
post_upgrade
}
+post_upgrade() {
+ getent group cdemu &>/dev/null || groupadd cdemu
+ _updatemod
+}
+
post_remove() {
- post_upgrade
- echo "Removing 'cdemu' group"
+ _updatemod
groupdel cdemu
}