File: fscklog.sh

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 (18 lines) | stat: -rw-r--r-- 458 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/sh
# fscklog.sh	See if we need to rotate the fsck logs
#

MAXSIZE=51200
NUMFILES=5
export BOOTLOGFILE=/var/log/fsck/boot.log
export ROOTLOGFILE=/var/log/fsck/root.log

if [ -f "$BOOTLOGFILE" ] && [ "$(stat -c %s $BOOTLOGFILE)" -gt "$MAXSIZE" ]
then
	savelog -g adm -m 640 -u root -c $NUMFILES $BOOTLOGFILE
fi

if [ -f "$ROOTLOGFILE" ] && [ "$(stat -c %s $ROOTLOGFILE)" -gt "$MAXSIZE" ]
then
	savelog -g adm -m 640 -u root -c $NUMFILES $ROOTLOGFILE
fi