PREUN
/bin/ash
# Remove /etc/shells entry without using external commands
if [ "$1" = "0" ]; then
SHELLS=/etc/shells
TEMP=${SHELLS}-
for sh in /bin/ash /bin/bsh; do
while read i; do echo $i; done < $SHELLS > $TEMP
while read i; do
[ "$i" = "$sh" ] || echo $i
done < $TEMP > $SHELLS
done
fi
POSTIN
/bin/ash
# Add /etc/shells entry without using external commands
SHELLS=/etc/shells
for sh in /bin/ash /bin/bsh; do
while read i; do [ "$i" = "$sh" ] && break; done < $SHELLS
[ "$i" = "$sh" ] || echo $sh >> $SHELLS
done