File: cron.daily

package info (click to toggle)
apt-listbugs 0.0.89
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 776 kB
  • ctags: 55
  • sloc: ruby: 1,532; sh: 174; makefile: 49
file content (24 lines) | stat: -rwxr-xr-x 566 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/sh -e

prefclean() {

	test -x /usr/share/apt-listbugs/aptcleanup || return 0
	test -x /usr/sbin/apt-listbugs || return 0
	test -f /etc/apt/preferences || return 0

	tmp=$(tempfile)

	/usr/share/apt-listbugs/aptcleanup > "$tmp" || return 0
	if ! diff -B "$tmp" /etc/apt/preferences > /dev/null; then
		if test -f "/var/backups/apt-listbugs.preferences"; then
			savelog -q /var/backups/apt-listbugs.preferences
		fi
		cp -aH /etc/apt/preferences /var/backups/apt-listbugs.preferences
		cp "$tmp" /etc/apt/preferences
  	fi
  	/bin/rm -f "$tmp"

}

prefclean