File: bootlogd.postinst

package info (click to toggle)
sysvinit 2.88dsf-59
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 2,300 kB
  • ctags: 1,736
  • sloc: ansic: 7,096; sh: 3,883; perl: 371; makefile: 315
file content (27 lines) | stat: -rw-r--r-- 580 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/bin/sh
set -e

if [ -x /etc/init.d/bootlogd ]; then
    update-rc.d bootlogd             defaults >/dev/null || exit $?
fi
if [ -x /etc/init.d/stop-bootlogd-single ]; then
    update-rc.d stop-bootlogd-single defaults >/dev/null || exit $?
fi
if [ -x /etc/init.d/stop-bootlogd ]; then
    update-rc.d stop-bootlogd        defaults >/dev/null || exit $?
fi

#
# Create initial log files
#
for F in /var/log/boot
do
	if [ ! -f "$F" ] && touch "$F" >/dev/null 2>&1
	then
		echo "(Nothing has been logged yet.)" >| "$F"
		chown root:adm "$F"
		chmod 640 "$F"
	fi
done

#DEBHELPER#