diff options
author | Andrew Tridgell <tridge@samba.org> | 2003-08-13 01:53:07 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2003-08-13 01:53:07 +0000 |
commit | cc3a6ea9920f30925a678c566b4af417da6d455b (patch) | |
tree | 60015a1a5f4b47ac3d133bdbbe32b75815595d4d /source4/smbwrapper/smbsh.in | |
parent | 4d1f9d1def5bf5fea64722626028d94da49c654c (diff) | |
parent | ef2e26c91b80556af033d3335e55f5dfa6fff31d (diff) | |
download | samba-cc3a6ea9920f30925a678c566b4af417da6d455b.tar.gz samba-cc3a6ea9920f30925a678c566b4af417da6d455b.tar.bz2 samba-cc3a6ea9920f30925a678c566b4af417da6d455b.zip |
This commit was generated by cvs2svn to compensate for changes in r30,
which included commits to RCS files with non-trunk default branches.
(This used to be commit 3a69cffb062d4f1238b8cae10481c1f2ea4d3d8b)
Diffstat (limited to 'source4/smbwrapper/smbsh.in')
-rw-r--r-- | source4/smbwrapper/smbsh.in | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/source4/smbwrapper/smbsh.in b/source4/smbwrapper/smbsh.in new file mode 100644 index 0000000000..323f091699 --- /dev/null +++ b/source4/smbwrapper/smbsh.in @@ -0,0 +1,54 @@ +#! /bin/sh + +SMBW_LIBDIR=${SMBW_LIBDIR-@builddir@/smbwrapper} + +if [ ! -f ${SMBW_LIBDIR}/smbwrapper.so ]; then + echo You need to set LIBDIR in smbsh + exit +fi + +# a simple launcher for the smbwrapper.so preloadde library + +if [ x"${SMBW_USER+set}" != x"set" ]; then + echo username? + read user + SMBW_USER=$user + export SMBW_USER +fi + +# this doesn't hide the password - we need a proper launch app for that +if [ x"${SMBW_PASSWORD+set}" != x"set" ]; then + echo password? + read pass + SMBW_PASSWORD=$pass + export SMBW_PASSWORD +fi + +PWD=`pwd` +export PWD +PS1='smbsh$ ' +export PS1 + + +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 + ;; + *osf*) + _RLD_LIST=$SMBW_LIBDIR/smbwrapper.so:DEFAULT + export _RLD_LIST + ;; + *) + LD_PRELOAD=$SMBW_LIBDIR/smbwrapper.so + export LD_PRELOAD + ;; +esac + +echo starting smbwrapper on $host_os + +exec ${SMBW_SHELL-${SHELL-/bin/sh}} ${1+"$@"} |