summaryrefslogtreecommitdiff
path: root/community-testing/vhba-module/vhba-module.install
diff options
context:
space:
mode:
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
}