2 # postinst script for iodine
4 # see: dh_installdeb(1)
8 . /usr/share/debconf/confmodule
10 # summary of how this script can be called:
11 # * <postinst> `configure' <most-recently-configured-version>
12 # * <old-postinst> `abort-upgrade' <new version>
13 # * <conflictor's-postinst> `abort-remove' `in-favour' <package>
15 # * <postinst> `abort-remove'
16 # * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
17 # <failed-install-package> <version> `removing'
18 # <conflicting-package> <version>
19 # for details, see http://www.debian.org/doc/debian-policy/ or
20 # the debian-policy package
25 # we need a tun device
26 if [ ! -e /dev/net/tun ] ; then
27 echo "Creating device /dev/net/tun ..."
28 cd /dev && WRITE_ON_UDEV=false ./MAKEDEV tun
30 # generate /etc/default/iodine
31 db_get iodine/start_daemon
33 db_get iodine/daemon_options
35 db_get iodine/daemon_password
37 cat <<EOF > /etc/default/iodine
38 # Default settings for iodine. This file is sourced from
40 START_IODINED="$START_IODINED"
41 IODINED_ARGS="$IODINED_ARGS"
42 IODINED_PASSWORD="$IODINED_PASSWORD"
46 abort-upgrade|abort-remove|abort-deconfigure)
50 echo "postinst called with unknown argument \`$1'" >&2
55 # tell debconf we are done. otherwise, it hangs waiting for the daemon.
58 # dh_installdeb will replace this with shell code automatically
59 # generated by other debhelper scripts.