Re: [PATCH] Trim some noise from the daily disk check

看板FB_current作者時間13年前 (2012/06/21 02:01), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串2/2 (看更多)
--WIyZ46R2i8wDzkSu Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Jun 20, 2012 at 09:35:27AM -0400, John Baldwin wrote: > The daily periodic e-mails for my boxes always include useless output fro= m=20 > dump -W. I think the daily e-mail should only do that if the sysadmin is= =20 > actually using dump. The patch below skips the dump reporting it=20 > /etc/dumpdates doesn't exist or exists and is an empty file (the latter i= s=20 > what you get out-of-the-box): >=20 > Index: 400.status-disks > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > --- 400.status-disks (revision 237227) > +++ 400.status-disks (working copy) > @@ -19,13 +19,16 @@ case "$daily_status_disks_enable" in > df $daily_status_disks_df_flags && rc=3D1 || rc=3D3 > =20 > # display which filesystems need backing up > - if ! [ -f /etc/fstab ]; then > - export PATH_FSTAB=3D/dev/null > + if [ -s /etc/dumpdates ]; then > + if ! [ -f /etc/fstab ]; then > + export PATH_FSTAB=3D/dev/null > + fi > + > + echo "" > + dump W || rc=3D3 > fi > + ;; > =20 > - echo "" > - dump W || rc=3D3;; > - > *) rc=3D0;; > esac > =20 > Thoughts? This seems sensible to me. -- Brooks --WIyZ46R2i8wDzkSu Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (FreeBSD) iD8DBQFP4gcnXY6L6fI4GtQRAgIhAJ4iUoW4pVm+ejmoikKjdZAiOzFjmQCggO/H /9C426YZI7nW4EkEHQXtqeM= =2sVV -----END PGP SIGNATURE----- --WIyZ46R2i8wDzkSu--
文章代碼(AID): #1FuW_UJ2 (FB_current)
文章代碼(AID): #1FuW_UJ2 (FB_current)