#!/bin/bash
username=`/usr/bin/id -un`
homedir=`cat /etc/passwd | grep "^$username" | cut -d':' -f 6`
cd $homedir
HOME=$homedir
TERM="xiterm"
if [ -f /opt/ccfw/data/language ]
then
   export LANG=`cat /opt/ccfw/data/language`
fi
`grep XMODIFIERS /etc/SuSEconfig/profile | tr "\"" "\0"`
title=`gettext -n -e -s "Restricted_Shell"`

TITLE=$title

if [ -f /opt/hsc/data/ssh/hmcsshrc ]
then
   $TERM -t $TITLE -sb -sl 1000 -e bash --rcfile /opt/hsc/data/ssh/hmcsshrc
else
   # This is the case where we want to force a normal
   # restricted shell if for some reason we can find
   # the default rcfiles provided by HMC
   $TERM -t $TITLE -sb -sl 1000 -e bash -r
fi
exit 0
