#!/bin/sh # /usr/local/sbin/dphys-config-altern-xterminal - set /etc/alternatives/* # author Neil Franklin, last modification 2006.10.12 # copyright ETH Zuerich Physics Departement, # use under either modified/non-advertising BSD or GPL license # this script is called by dphys-config, once on each install/update # no parameters or env vars for this script # it requires in /etc/dphys-config.list 1 line: # local/sbin/dphys-config-altern-xterminal:/usr/:chmod 755 {}; {} # this will only work on Debian, as /etc/alternatives/* is Debian specific set -e # get ready to work # /usr/local added for FreeBSD, because their ports end up in there PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin export PATH # --- main stuff if [ -x /usr/X11R6/bin/uxterm ] ; then update-alternatives --set x-terminal-emulator /usr/X11R6/bin/uxterm #update-alternatives --list x-terminal-emulator | nl | \ # grep /uxterm | awk '{print $1}' | \ # update-alternatives --config x-terminal-emulator > /dev/null else MISSING_PACKAGE=yes fi # --- avoid problem with not running on install, because packages not yet here if [ "${MISSING_PACKAGE}" = yes ] ; then # remove this script to force rerun and reinstall on next dphys-config run # should happen after the reboot directly after installing all packages rm $0 # this will actually produce warning from dphys-config, but exit 0 is wrong exit 1 fi # --- finish off exit 0