1998-10-05 02:42:05 +04:00
#! /bin/sh
1998-10-02 16:37:31 +04:00
1998-10-05 02:42:05 +04:00
SMBW_LIBDIR=${SMBW_LIBDIR-@builddir@/smbwrapper}
1998-10-04 19:02:15 +04:00
1998-10-05 02:42:05 +04:00
if [ ! -f ${SMBW_LIBDIR}/smbwrapper.so ]; then
1998-10-04 19:02:15 +04:00
echo You need to set LIBDIR in smbsh
exit
fi
1998-10-03 16:47:52 +04:00
1998-10-02 16:37:31 +04:00
# a simple launcher for the smbwrapper.so preloadde library
1998-10-05 02:42:05 +04:00
if [ x"${SMBW_USER+set}" != x"set" ]; then
1998-10-03 12:34:35 +04:00
echo username?
read user
1998-10-04 18:02:50 +04:00
SMBW_USER=$user
export SMBW_USER
1998-10-03 12:34:35 +04:00
fi
# this doesn't hide the password - we need a proper launch app for that
1998-10-05 02:42:05 +04:00
if [ x"${SMBW_PASSWORD+set}" != x"set" ]; then
1998-10-03 12:34:35 +04:00
echo password?
read pass
1998-10-04 18:02:50 +04:00
SMBW_PASSWORD=$pass
1998-10-04 18:56:19 +04:00
export SMBW_PASSWORD
1998-10-03 12:34:35 +04:00
fi
1998-10-04 19:54:04 +04:00
PWD=`pwd`
1998-10-03 12:34:35 +04:00
export PWD
1998-10-04 18:02:50 +04:00
PS1='smbsh$ '
export PS1
1998-10-05 02:42:05 +04:00
1998-10-05 16:17:01 +04:00
host_os=@HOST_OS@
case "$host_os" in
*irix*)
_RLDN32_LIST=$SMBW_LIBDIR/smbwrapper.so:DEFAULT
_RLD_LIST=$SMBW_LIBDIR/smbwrapper.32.so:DEFAULT
export _RLDN32_LIST
export _RLD_LIST
;;
1998-10-07 08:44:31 +04:00
*osf*)
_RLD_LIST=$SMBW_LIBDIR/smbwrapper.so:DEFAULT
export _RLD_LIST
;;
1998-10-05 16:17:01 +04:00
*)
LD_PRELOAD=$SMBW_LIBDIR/smbwrapper.so
export LD_PRELOAD
;;
esac
1998-10-06 03:44:13 +04:00
echo starting smbwrapper on $host_os
1998-10-05 02:42:05 +04:00
exec ${SMBW_SHELL-${SHELL-/bin/sh}} ${1+"$@"}