summaryrefslogtreecommitdiff
path: root/bin/locmaint
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2022-06-19 21:36:11 -0700
committerSean Whitton <spwhitton@spwhitton.name>2022-06-20 17:49:52 -0700
commite0af493195d4743d8d44a29fca82291b7b872cba (patch)
treeb8cc698a3fc82de5f559a53b7ce1671f2f00eb04 /bin/locmaint
parent77208cf964b569fe201fba1d6f5d9fcb3988b89c (diff)
downloaddotfiles-e0af493195d4743d8d44a29fca82291b7b872cba.tar.gz
locmaint: df: filter out uninteresting mount points
Diffstat (limited to 'bin/locmaint')
-rwxr-xr-xbin/locmaint8
1 files changed, 6 insertions, 2 deletions
diff --git a/bin/locmaint b/bin/locmaint
index 9366f6a3..f6bf2c56 100755
--- a/bin/locmaint
+++ b/bin/locmaint
@@ -502,8 +502,12 @@ sub do_sysmaint {
for grep !/\A$kernel_pkg_name\z/,
map { /^..A? (\S+)\s/; $1 } `aptitude search '?obsolete'`;
- show_user
- ("df -h", "Clean up some files if host does not have enough disc space");
+ (split " ")[-1] =~ m#\A/(dev|run|snap|var/lib/schroot)#
+ or print for `df -hP`;
+ say_spaced_bullet(
+ "Clean up some files if host does not have enough disc space");
+ get_ack();
+
script_status("updating apt indices");
system as_root("apt-get update");
die "apt-get update failed" unless $? == 0;