rendered paste body#!/sbin/runscript# Path to the DB2 installationDB2DIR="/opt/IBM/db2/V8.1"# User name of the Administration Instance ownerDASUSR="dasusr1"# Include common definition fileif [ -f ${DB2DIR}/instance/db2iutil ]; then PROGDIR="${DB2DIR}/instance" PROGNAME="db2init" . ${DB2DIR}/instance/db2iutil LOGFILE=/tmp/${PROGNAME}.logelse eerror "File ${DB2DIR}/db2iutil not found." exit 1fidepend() { need net bootmisc}start() { ebegin "Starting IBM DB2 Database Instances" ${DB2DIR}/instance/db2istrt eend ${?} ebegin "Starting IBM DB2 Administration Instance" find_homedir ${DASUSR} INSTHOME="${USERHOME}" su ${DASUSR} -c "\ . ${INSTHOME}/das/dasprofile 2>&1 >/dev/null; \ db2admin start" 2>&1 >> ${LOGFILE} eend ${?}}stop() { ebegin "Stopping IBM DB2 Administration Instance" find_homedir ${DASUSR} INSTHOME="${USERHOME}" su ${DASUSR} -c "\ . ${INSTHOME}/das/dasprofile 2>&1 >/dev/null; \ db2admin stop" 2>&1 >> ${LOGFILE} eend ${?} ebegin "Stopping IBM DB2 Database Instances" ${DB2DIR}/instance/db2ishut eend ${?}}