#!/bin/sh # http://www.phys.ethz.ch/~franklin/Projects/dphys3/end2stage.dphys-admin # - script to be run at end of second install stage for further automation # installs additional base-config script to install dphys-admin # uses http://www.phys.ethz.ch/~franklin/Projects/dphys-admin/ # copyright ETH Zuerich Physics Departement, # use under either BSD or GPL license # author Neil Franklin, last modification 2005.04.01 # this script is intended to be run as root at end of install ### ------ configuration for this script # first CONF_* various site or subnet dependant user config variables # then DEBUG_* various debugging settings # last SYS_* various system internal values # some of these are overridable by hostname input line options # --- CONF_* various site or subnet dependant user config variables # none of these currently # --- DEBUG_*, various debugging settings # these can be set to "yes" by -D option, followed by name without DEBUG_ # set this to sleep after displaying each steps header, number is in seconds #DEBUG_SLEEP=2 # set this to output debug state info after each step #DEBUG_PRINT_STEP=yes # set this to output debug state info and wait after each step #DEBUG_WAIT_STEP=yes # --- SYS_*, various system internal values # none of these currently ### ------ actual implementation from here on # no user settings any more below this point if [ x${DEBUG_SLEEP} != x ] ; then /bin/sleep ${DEBUG_SLEEP} fi # --- insert script to load our site package # do an apt-get install of site package at the end # this allows us to do anything, including rebooting, without conflicts # install identd, else no access to non-free site packages and config files # this was once needed, for woody, but sarge already loads an pidentd # run yes with nice, else it uses up all CPU und apt-get gets really slow #/usr/bin/nice /usr/bin/yes '' | /usr/bin/apt-get install oidentd # now we can add our local packages server to apt sources list echo deb http://debian.ethz.ch/pub/debian-local sarge/local \ main contrib non-free >> /etc/apt/sources.list echo deb-src http://debian.ethz.ch/pub/debian-local sarge/local \ main contrib non-free >> /etc/apt/sources.list # now we can access extra package lists let apt update package database /usr/bin/nice /usr/bin/yes '' | /usr/bin/apt-get update # and have dpkg also update its package database /usr/bin/apt-cache dumpavail > /var/cache/apt/available /usr/bin/dpkg --update-avail /var/cache/apt/available /bin/rm -f /var/cache/apt/available # and trigger installing of all our site dependant stuff # we name all our self made packages dphys-*, # you are advised to use -* # site specific setup stuff is called dphys-local-* # see "makesourcepackage" for generating/modifying such packages # dphys-local-admin package is expected to: # a) set up base url for dphys-admin to read packages list from # b) set up base url for dphys-local-* to read config files from # run yes with nice, else it uses up all CPU und apt-get gets really slow /usr/bin/nice /usr/bin/yes '' | /usr/bin/apt-get install dphys-local-admin # dphys-admin package is expected to: # a) add daily cron job to apt-get update/upgrade, incl newer dphys-admin # b) add init script for the case cron job is not run due to power off # install dphys-admin package manager to get rest of packages and configs # uses http://www.phys.ethz.ch/~franklin/Projects/dphys-admin/ /usr/bin/nice /usr/bin/yes '' | /usr/bin/apt-get install dphys-admin # and the last action of the 2nd install phase, pass on to dphys-admin # does an apt-get install of many site specific packages # this allows us to do anything, including rebooting, without conflicts /bin/echo "### activate dphys-admin install/upgrade process, as if booting" /etc/init.d/dphys-admin start if [ x${DEBUG_WAIT_STEP} = xyes ] ; then /bin/echo "--- DEBUG: info ---" /bin/ls -al ${SCRIPT_SITEPACKAGE} /bin/echo "--- end info ---" fi if [ x${DEBUG_WAIT_STEP} = xyes ] ; then read -p "--- DEBUG: wait after step ---" dummy fi exit 0