Date: Thu, 01 Dec 2022 13:37:44 +0000 From: bugzilla-noreply@freebsd.org To: ports-bugs@FreeBSD.org Subject: [Bug 268099] egrep empty string issue Message-ID: <bug-268099-7788@https.bugs.freebsd.org/bugzilla/>
next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D268099 Bug ID: 268099 Summary: egrep empty string issue Product: Ports & Packages Version: Latest Hardware: Any OS: Any Status: New Severity: Affects Only Me Priority: --- Component: Individual Port(s) Assignee: ports-bugs@FreeBSD.org Reporter: mail@rubenvos.com Hi, We ran into an issue where snapshots were not being deleted properly. Fortunately my co-worker was able to identify and hotpatch the issue.=20 More specifically: the way egrep is being used (against an empty string) in= the script seems invalid. Using FreeBSD egrep in this particular situation thro= ws this: # egrep "string(aaa|)" egrep: empty (sub)expression #=20 since some variables are declared empty by default this caused snapshots not being deleted, which in turn filled up our ZFS pool on one of our machines. Altering the script like this: diff /root/zfSnap /usr/local/sbin/zfSnap :=20 235,236c235,236 < delete_specific_fs_snapshots=3D"someText" # List of specific snapshot= s to delete < delete_specific_fs_snapshots_recursively=3D"someText" # List of specific snapshots to delete recursively --- > delete_specific_fs_snapshots=3D"" # List of specific snapshots to del= ete > delete_specific_fs_snapshots_recursively=3D"" # List of specific snapshot= s to delete recursively 398d397 < export rm_snapshot_pattern=3DsomeText solved our predicament.=20 Kind regards, Ruben --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-268099-7788>