PREUN
/bin/sh
if [ "$1" = "0" ]; then
grep -v /bin/rssh /etc/shells | grep -v /bin/scpsh | grep -v /bin/sftpsh > /etc/shells.new
mv -f /etc/shells.new /etc/shells
fi
POSTIN
/bin/sh
if [ ! -f /etc/shells ]; then
echo "/bin/rssh" > /etc/shells
echo "/bin/scpsh" >> /etc/shells
echo "/bin/sftpsh" >> /etc/shells
else
if ! grep -q '^/bin/rssh$' /etc/shells; then
echo "/bin/rssh" >> /etc/shells
fi
if ! grep -q '^/bin/scpsh$' /etc/shells; then
echo "/bin/scpsh" >> /etc/shells
fi
if ! grep -q '^/bin/sftpsh$' /etc/shells; then
echo "/bin/sftpsh" >> /etc/shells
fi
fi