diff options
Diffstat (limited to 'emulators/virtualbox-ose/files/pkg-install.in')
-rw-r--r-- | emulators/virtualbox-ose/files/pkg-install.in | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/emulators/virtualbox-ose/files/pkg-install.in b/emulators/virtualbox-ose/files/pkg-install.in new file mode 100644 index 000000000000..5d5268d8e8ce --- /dev/null +++ b/emulators/virtualbox-ose/files/pkg-install.in @@ -0,0 +1,22 @@ +#!/bin/sh + +case $2 in +POST-INSTALL) + GROUP=%%VBOXGROUP%% + GID=%%VBOXGID%% + PW=/usr/sbin/pw + + if ${PW} group show "${GROUP}" 2>/dev/null; then + echo "You already have a group \"${GROUP}\", so I will use it." + else + if ${PW} groupadd ${GROUP} -g ${GID}; then + echo "Added group \"${GROUP}\"." + else + echo "Adding group \"${GROUP}\" failed..." + exit 1 + fi + fi + + exit 0 + ;; +esac |