summaryrefslogtreecommitdiff
path: root/community-testing/virtualbox/virtualbox.install
blob: e70757685b8e348a429241dbb31acc196d6af10c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
utils() {
    if [ -x usr/bin/update-mime-database ]; then
        update-mime-database usr/share/mime > /dev/null 2>&1
    fi

    if [ -x usr/bin/xdg-icon-resource ]; then
        xdg-icon-resource forceupdate --theme hicolor > /dev/null 2>&1
    fi

    if [ -x usr/bin/update-desktop-database ]; then
        usr/bin/update-desktop-database -q
    fi
}

post_install() {
    getent group vboxusers >> /dev/null || usr/sbin/groupadd -g 108 vboxusers
    /bin/cat << EOF

===> In order to run VirtualBox, you have to  be in the 'vboxusers' group.
===>
===> If you want to be able to install guest additions, you have to install
===> 'virtualbox-additions' package.
===>
===> You must load vboxdrv module before starting VirtualBox:
===> # modprobe vboxdrv
===>
===> You must load vboxnetflt for Host Interface Networking:
===> # modprobe vboxnetflt
===>
===> You must load vboxnetadp for Host-Only networking:
===> # modprobe vboxnetadp
===>
===> To load it automatically, add vboxdrv module
===> to the MODULES array in /etc/rc.conf.

*** To compile the modules do /etc/rc.d/vboxdrv setup ***

EOF
  utils
}

post_upgrade() {
    getent group vboxusers >> /dev/null || usr/sbin/groupadd -g 108 vboxusers
    /bin/cat << EOF
===> You must reload vboxdrv module before starting VirtualBox:
===> # modprobe vboxdrv
===>
===> You must reload vboxnetflt for Host Interface Networking:
===> # modprobe vboxnetflt
===>
===> You must reload vboxnetadp for Host-Only networking:
===> # modprobe vboxnetadp
===>
===> To load it automatically, add vboxdrv module
===> to the MODULES array in /etc/rc.conf.

*** To recompile the modules do /etc/rc.d/vboxdrv setup ***
EOF
   utils
}

post_remove() {
    groupdel vboxusers >/dev/null 2>&1 || true
    utils
}