pkg://workman_1.3.4-18_alpha.deb:143650/postinst
info downloads
#!/bin/sh
# Debian standard handling
set -e
case $1 in
abort-*) exit 0;;
esac
# The script has to ensure that a link /dev/cdrom to the real
# CD-ROM device exists and that the device belongs to the cdrom
# group and is readable and executable by the group
# Workman should not be run suid root !
# Source debconf library.
. /usr/share/debconf/confmodule
# Get and link the cdrom device
if [ ! -b /dev/cdrom ]
then
db_get workman/which_device
DEVICE="$RET"
# I dont trust debconf so that I add two checks
DEFAULT='/dev/hdc'
if [ -z "$DEVICE" ]; then DEVICE="$DEFAULT" ; fi
if [ "$DEVICE" = '/dev/cdrom' ]; then DEVICE="$DEFAULT" ; fi
# Now the actual link is made
if ln -sf $DEVICE /dev/cdrom
then
db_input low workman/cdrom_link_created || true
else
db_input medium workman/cdrom_link_failed || true
fi
db_go
fi
# change group to cdrom
if chgrp --dereference cdrom /dev/cdrom
then
db_input low workman/cdrom_gid_changed || true
else
db_input medium workman/cdrom_gid_failed || true
fi
db_go
# allow full access by cdrom
if chmod g+rwx /dev/cdrom
then
db_input low workman/cdrom_perm_changed || true
else
db_input medium workman/cdrom_perm_failed || true
fi
db_go
# Update menus
if [ -x /usr/bin/update-menus ]; then update-menus; fi