Remove squashfs from df output on zz-disk-space

Mauro Dionisi <[email protected]> Thu, 5 Sep 2019 09:25:51 -0300
Newsgroups gmane.comp.log.logwatch.devel
Message-ID <[email protected]>
This is a multi-part message in MIME format.
--------------BC8C5071EDA0BE4E30327C46
Content-Type: text/plain; charset=windows-1252; format=flowed
Content-Transfer-Encoding: 8bit

Hi there!

I'm using Ubuntu 18.04 with snap.

I would like to suggest a patch in order to remove squashfs entries from 
df output.

The idea is to, instead of receiving this:

$ df -h -x tmpfs -x devtmpfs -x udf -x iso9660
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda2        20G  1.4G   18G   8% /
/dev/sda3        20G  1.6G   18G   9% /usr
/dev/sda5        20G  3.2G   16G  17% /var
/dev/loop0       89M   89M     0 100% /snap/core/7396
/dev/loop1       55M   55M     0 100% /snap/core18/1098
/dev/loop3       55M   55M     0 100% /snap/core18/1074
/dev/loop2      212M  212M     0 100% /snap/nextcloud/15565
/dev/loop5       89M   89M     0 100% /snap/core/7270
/dev/loop6       69M   69M     0 100% /snap/motion-ogra/17
/dev/sda4        99G   27G   67G  29% /home
/dev/loop4      212M  212M     0 100% /snap/nextcloud/15119
/dev/sda6        50G   23G   25G  49% /srv
/dev/sda7       196G   77G  110G  42% /mnt/extra

Receive this:

$ df -h -x tmpfs -x devtmpfs -x udf -x iso9660 -x squashfs
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda2        20G  1.4G   18G   8% /
/dev/sda3        20G  1.6G   18G   9% /usr
/dev/sda5        20G  3.2G   16G  17% /var
/dev/sda4        99G   27G   67G  29% /home
/dev/sda6        50G   23G   25G  49% /srv
/dev/sda7       196G   77G  110G  42% /mnt/extra

I found the df options for Linux in the zz-disk-space script.

I downloaded the file from this link: 
https://sourceforge.net/p/logwatch/git/ci/master/tree/scripts/services/zz-disk_space

Please, find attached the proposed patch.

Thanks for your time

--

Mauro


--------------BC8C5071EDA0BE4E30327C46
Content-Type: text/plain; charset=UTF-8;
 name="zz-disk-space.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
 filename="zz-disk-space.patch"

--- zz-disk-space.orig	2019-09-05 08:59:27.787302661 -0300
+++ zz-disk-space	2019-09-05 09:00:06.225596181 -0300
@@ -156,7 +156,7 @@
 #Main
 
 if ($OSname eq "Linux") {
-	$df_options = "-h -x tmpfs -x devtmpfs -x udf -x iso9660";
+	$df_options = "-h -x tmpfs -x devtmpfs -x udf -x iso9660 -x squashfs";
 	if ($local_disks_only) { $df_options .= " -l"; }
 } elsif ($OSname eq "Darwin") {
 	$df_options = "-h";

--------------BC8C5071EDA0BE4E30327C46
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline


--------------BC8C5071EDA0BE4E30327C46
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Logwatch-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/logwatch-devel

--------------BC8C5071EDA0BE4E30327C46--