post_install() { systemctl --system daemon-reload ldconfig -n usr/lib [[ -d usr/lib32 ]] && ldconfig -n usr/lib32 locale-gen update-netconfig update-sock2path update-snmpconf --install if [[ -x usr/bin/tclsh ]]; then for d in `find usr/lib/OpenSS71.1 -mindepth 1 -maxdepth 1 -type d` ; do echo -e "pkg_mkIndex $d\\nexit" | tclsh || : done fi } post_upgrade() { systemctl --system daemon-reload ldconfig -n usr/lib [[ -d usr/lib32 ]] && ldconfig -n usr/lib32 locale-gen update-netconfig update-sock2path update-snmpconf --install if [[ -x usr/bin/tclsh ]]; then for d in `find usr/lib/OpenSS71.1 -mindepth 1 -maxdepth 1 -type d` ; do echo -e "pkg_mkIndex $d\\nexit" | tclsh || : done fi } pre_remove() { rm -f -- etc/nslconfig.d/openss7 rmdir -p -- etc/nslconfig.d >/dev/null 2>&1 || : update-netconfig rm -f -- etc/sock2path.d/openss7 rmdir -p -- etc/sock2path.d >/dev/null 2>&1 || : update-sock2path rm -f -- etc/snmp/snmp.d/*openss7 rmdir -p -- etc/snmp/snmp.d >/dev/null 2>&1 || : update-snmpconf --remove } post_remove() { systemctl --system daemon-reload ldconfig -n usr/lib [[ -d usr/lib32 ]] && ldconfig -n usr/lib32 files="usr/lib/OpenSS71.1/pkgIndex.tcl usr/lib/OpenSS71.1/*/pkgIndex.tcl" for f in $files; do [ -f "$f" ] || continue rm -f -- "$f" || : if [ -d "`dirname $f`" ]; then rmdir -p -- "`dirname $f`" 2>/dev/null || : fi done } # vim: sw=2 et