#!/bin/sh # echo "updating default paths" FILE=${INSTALL_DST}/etc/default/su # # update PATH (search path for normal users) # VAR=PATH VALUE='/usr/local/bin:/usr/bin:' TFILE=${FILE}.$$ sed -e "s%^[# ]*${VAR}=.*\$%${VAR}=${VALUE}%" ${FILE} > ${TFILE} mv ${TFILE} ${FILE} # # update SUPATH (search path for root) # VAR=SUPATH VALUE='/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:' TFILE=${FILE}.$$ sed -e "s%^[# ]*${VAR}=.*\$%${VAR}=${VALUE}%" ${FILE} > ${TFILE} mv ${TFILE} ${FILE} # # Reset the permissions on the new # file to whatever it was set to during the install # IFILE=`echo ${FILE} | sed -e "s|^${INSTALL_DST}||g"` PERM=`grep "^${IFILE} e" ${INSTALL_DST}/var/sadm/install/contents | (read f1 f2 f3 f4 f5 ; echo $f4)` chmod ${PERM} ${FILE} exit 0