#!/bin/sh set -e migratious_files="libnspr4.so libplc4.so libplds4.so" if [ "$1" = "upgrade" ]; then for f in $migratious_files; do # before new binaries get installed, we move the links if [ -L /usr/lib/$f ]; then rm -f /usr/lib/XNOLDCONFIG_$f.new-migration mv /usr/lib/$f /usr/lib/XNOLDCONFIG_$f.new-migration fi # before the new links get installed, we move the old binaries if [ -r /usr/lib/$f.0d -a ! -L /usr/lib/$f.0d ]; then rm -f /usr/lib/XNOLDCONFIG_$f.0d.new-migration mv /usr/lib/$f.0d /usr/lib/XNOLDCONFIG_$f.0d.new-migration fi done fi