etc/smartmontools/run.d
usr/share/smartmontools
usr/sbin
-var/lib/smartmontools
+++ /dev/null
-#!/bin/bash
-#
-# Generate a set of logcheck rules to ignore certain attributes
-#
-# see /etc/smartmontools/logcheck
-
-OUT=/var/lib/smartmontools/logcheck.rules
-CFG=/etc/smartmontools/logcheck
-LOGCHECKFILES="/etc/logcheck/ignore.d.server/smartmontools"
-
-[ -r $CFG ] && . $CFG
-
-function create_rules()
-{
- cat <<EOF >$OUT
-# Autogenerated by `basename $0`
-#
-# do not edit by hand, it will be overwritten
-# edit $CFG instead
-#
-EOF
- for ATTR in $ignore; do
- echo "smartd\[[0-9]+\]: Device: /dev/.+, SMART Attribute: $ATTR \w+ changed from " >> $OUT
- done
-}
-
-function create_symlinks()
-{
- [ ! -d /etc/logcheck ] && return
-
- for LINK in $LOGCHECKFILES; do
- if [ ! -f $LINK ]; then
- ln -s $OUT $LINK
- fi
- done
-}
-
-function delete_rules()
-{
- rm -f $OUT
-}
-
-function delete_symlinks()
-{
- for LINK in $LOGCHECKFILES; do
- if [ -L $LINK ]; then
- TARGET=`readlink -n -s $LINK` || true
- [ "$TARGET" == "$OUT" ] && rm -f $TARGET
- fi
- done
-}
-
-
-if [ "$ignore" ]; then
- create_rules
- create_symlinks
-else
- delete_symlinks
- delete_rules
-fi
-
+++ /dev/null
-debian/generate-logcheck-rules /usr/share/smartmontools/
-debian/logcheck /etc/smartmontools/
+++ /dev/null
-#! /bin/sh
-# postinst script for smartmontools
-#
-# see: dh_installdeb(1)
-
-set -e
-
-# summary of how this script can be called:
-# * <postinst> `configure' <most-recently-configured-version>
-# * <old-postinst> `abort-upgrade' <new version>
-# * <conflictor's-postinst> `abort-remove' `in-favour' <package>
-# <new-version>
-# * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
-# <failed-install-package> <version> `removing'
-# <conflicting-package> <version>
-# for details, see http://www.debian.org/doc/debian-policy/ or
-# the debian-policy package
-#
-
-case "$1" in
- configure)
- echo -n "Regenerating logcheck rules..."
- /usr/share/smartmontools/generate/logcheck-rules
- echo "done."
- ;;
-
- abort-upgrade|abort-remove|abort-deconfigure)
-
- ;;
-
- *)
- echo "postinst called with unknown argument \`$1'" >&2
- exit 1
- ;;
-esac
-
-# dh_installdeb will replace this with shell code automatically
-# generated by other debhelper scripts.
-
-#DEBHELPER#
-
-exit 0
-
-
+++ /dev/null
-#! /bin/sh
-# postrm script for smartmontools
-#
-# see: dh_installdeb(1)
-
-set -e
-
-# summary of how this script can be called:
-# * <postrm> `remove'
-# * <postrm> `purge'
-# * <old-postrm> `upgrade' <new-version>
-# * <new-postrm> `failed-upgrade' <old-version>
-# * <new-postrm> `abort-install'
-# * <new-postrm> `abort-install' <old-version>
-# * <new-postrm> `abort-upgrade' <old-version>
-# * <disappearer's-postrm> `disappear' <r>overwrit>r> <new-version>
-# for details, see http://www.debian.org/doc/debian-policy/ or
-# the debian-policy package
-
-
-if [ "$1" = "purge" ]; then
- FIXME: remove logcheck stuff
-fi
-
-# dh_installdeb will replace this with shell code automatically
-# generated by other debhelper scripts.
-
-#DEBHELPER#
-
-exit 0