Sophie

Sophie

distrib > Scientific%20Linux > 5x > i386 > by-pkgid > 76fa78cda6f4749a2ec121ea0cf256ca > scriptlet

bash-3.2-32.el5_9.1.i386.rpm

POSTIN

/bin/sh

HASBASH=""
HASSH=""

if [ ! -f /etc/shells ]; then
  > /etc/shells
fi

(while read line ; do
  if [ "$line" = "/bin/bash" ]; then
    HASBASH=1
  elif [ "$line" = "/bin/sh" ]; then
    HASSH=1
  fi
 done

 if [ -z "$HASBASH" ]; then
  echo "/bin/bash" >> /etc/shells
 fi
 if [ -z "$HASSH" ]; then
  echo "/bin/sh" >> /etc/shells
fi) < /etc/shells

POSTUN

/bin/sh
if [ "$1" = 0 ]; then
    /bin/grep -v '^/bin/bash$' < /etc/shells | \
      /bin/grep -v '^/bin/sh$' > /etc/shells.new
    /bin/mv /etc/shells.new /etc/shells
fi