1#! /bin/sh 2 3SMBW_LIBDIR=${SMBW_LIBDIR-@builddir@/smbwrapper} 4 5if [ ! -f ${SMBW_LIBDIR}/smbwrapper.so ]; then 6 echo You need to set LIBDIR in smbsh 7 exit 8fi 9 10# a simple launcher for the smbwrapper.so preloadde library 11 12if [ x"${SMBW_USER+set}" != x"set" ]; then 13 echo username? 14 read user 15 SMBW_USER=$user 16 export SMBW_USER 17fi 18 19# this doesn't hide the password - we need a proper launch app for that 20if [ x"${SMBW_PASSWORD+set}" != x"set" ]; then 21 echo password? 22 read pass 23 SMBW_PASSWORD=$pass 24 export SMBW_PASSWORD 25fi 26 27PWD=`pwd` 28export PWD 29PS1='smbsh$ ' 30export PS1 31 32 33host_os=@HOST_OS@ 34 35case "$host_os" in 36 *irix*) 37 _RLDN32_LIST=$SMBW_LIBDIR/smbwrapper.so:DEFAULT 38 _RLD_LIST=$SMBW_LIBDIR/smbwrapper.32.so:DEFAULT 39 export _RLDN32_LIST 40 export _RLD_LIST 41 ;; 42 *osf*) 43 _RLD_LIST=$SMBW_LIBDIR/smbwrapper.so:DEFAULT 44 export _RLD_LIST 45 ;; 46 *) 47 LD_PRELOAD=$SMBW_LIBDIR/smbwrapper.so 48 export LD_PRELOAD 49 ;; 50esac 51 52echo starting smbwrapper on $host_os 53 54exec ${SMBW_SHELL-${SHELL-/bin/sh}} ${1+"$@"} 55