#! /bin/bash # postinst script for smbedu # # see: dh_installdeb(1) set -e # summary of how this script can be called: # * `configure' # * `abort-upgrade' # * `abort-remove' `in-favour' # # * `abort-deconfigure' `in-favour' # `removing' # # for details, see /usr/doc/packaging-manual/ # # quoting from the policy: # Any necessary prompting should almost always be confined to the # post-installation script, and should be protected with a conditional # so that unnecessary prompting doesn't happen if a package's # installation fails and the `postinst' is called with `abort-upgrade', # `abort-remove' or `abort-deconfigure'. case "$1" in configure) case `cat /etc/debian_version` in 4.0) install_script="install_se3_etch.sh" ;; 5.0*) install_script="install_se3_lenny.sh" ;; 6.0*) install_script="install_se3_squeeze.sh" ;; 7.*) install_script="install_se3_wheezy.sh" ;; *) echo "Version Debian inconnue" exit 1 ;; esac if [ ! -e /etc/sudoers ]; then cp /etc/sudoers.se3 /etc/sudoers chmod 440 /etc/sudoers fi cd /var/cache/se3_install/ if [ -f /etc/SeConfig.ph ]; then echo "Voulez-vous faire la mise a jour de SambaEdu3 ? O/n" read -t 20 rep || rep="o" if [ "$rep" = "n" -o "$rep" = "N" ]; then echo "Voulez-vous Reinstaller SambaEdu3 ? o/n" read rep #[ "$rep" = "o" ] && ./$install_script [ "$rep" = "o" -o "$rep" = "O" ] && ./$install_script else ./maj_se.sh fi /usr/share/se3/scripts/permse3 echo "Instanciation en cours..." /usr/share/se3/sbin/instance_se3.sh /usr/share/se3/sbin/create_adminse3.sh else ./$install_script fi ;; *) echo "postinst called with unknown argument \`$1'" >&2 exit 0 ;; esac # dh_installdeb will replace this with shell code automatically # generated by other debhelper scripts. # Automatically added by dh_installdocs if [ "$1" = "configure" ]; then if [ -d /usr/doc -a ! -e /usr/doc/se3 -a -d /usr/share/doc/se3 ]; then ln -sf /var/cache/se3_install/doc /usr/doc/se3 ln -sf /var/cache/se3_install/doc /usr/share/doc/se3 fi fi # End automatically added section exit 0