Sophie

Sophie

distrib > Mageia > 7 > x86_64 > by-pkgid > 4452419240b97dfe91b28f291551b6b8 > scriptlet

ksh-2020.0.0.81.git8052490-0.1.mga7.x86_64.rpm

POSTIN

/bin/sh
for s in /bin/ksh /bin/rksh /usr/bin/ksh /usr/bin/rksh 
do
  if [ ! -f /etc/shells ]; then
        echo "$s" > /etc/shells
  else
        if ! grep -q '^'"$s"'$' /etc/shells ; then
                echo "$s" >> /etc/shells
        fi
  fi
done

/bin/systemctl try-restart systemd-binfmt.service >/dev/null 2>&1 || :

POSTUN

/bin/sh
for s in /bin/ksh /bin/rksh /usr/bin/ksh /usr/bin/rksh 
do
  if [ ! -f $s ]; then
     sed -i '\|^'"$s"'$|d' /etc/shells
  fi
done