#!/bin/sh # # --- T2-COPYRIGHT-NOTE-BEGIN --- # T2 SDE: package/*/cron/00-updates.cron # Copyright (C) 2004 - 2022 The T2 SDE Project # Copyright (C) 1998 - 2003 ROCK Linux Project # # This Copyright note is generated by scripts/Create-CopyPatch, # more information can be found in the files COPYING and README. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2. # --- T2-COPYRIGHT-NOTE-END --- exec 2>&1 type ldconfig > /dev/null && echo "Running ldconfig ..." && ldconfig # Recover from deletion, per FHS. #/usr/bin/install -d -o man -g man -m 0755 /var/cache/man # Expunge old catman pages which have not been read in a week. #/usr/bin/find /var/cache/man -type f -name *.gz -atime +6 -delete # Regenerate man database. #/usr/bin/mandb --quiet echo "Running updatedb ..." updatedb "--prunepaths=/tmp /var/tmp /root /proc /sys /dev /home /user /mnt" echo "Recreate info dir ..." rm -f /usr/share/info/dir find /usr/share/info /opt/*/info/ -type f 2>/dev/null | grep -v -E -e "/dir$|-[0-9]+$" | while read x ; do { install-info "--info-dir=/usr/share/info" $x 2>&1 ; } | egrep -v 'no info dir entry in|already exists, for file' done echo