preparing for release of alpha.1.4
[Samba.git] / source / smbwrapper / smbsh.in
blob323f09169934e770a8bb94b9ee805e0a8a533844
1 #! /bin/sh
3 SMBW_LIBDIR=${SMBW_LIBDIR-@builddir@/smbwrapper}
5 if [ ! -f ${SMBW_LIBDIR}/smbwrapper.so ]; then
6 echo You need to set LIBDIR in smbsh
7 exit
8 fi
10 # a simple launcher for the smbwrapper.so preloadde library
12 if [ x"${SMBW_USER+set}" != x"set" ]; then
13 echo username?
14 read user
15 SMBW_USER=$user
16 export SMBW_USER
19 # this doesn't hide the password - we need a proper launch app for that
20 if [ x"${SMBW_PASSWORD+set}" != x"set" ]; then
21 echo password?
22 read pass
23 SMBW_PASSWORD=$pass
24 export SMBW_PASSWORD
27 PWD=`pwd`
28 export PWD
29 PS1='smbsh$ '
30 export PS1
33 host_os=@HOST_OS@
35 case "$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
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
50 esac
52 echo starting smbwrapper on $host_os
54 exec ${SMBW_SHELL-${SHELL-/bin/sh}} ${1+"$@"}