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