Skip to content

Commit

Permalink
Skip /usr fs check when disabling protection if forced (#15458)
Browse files Browse the repository at this point in the history
There are some scenarios where we want to skip the check for
the root filesystem (for instance in some jenkins pipelines) if
the operation has the force parameter set.
  • Loading branch information
anodos325 authored Jan 22, 2025
1 parent fde2a42 commit 9e3a0db
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/freenas/usr/local/libexec/disable-rootfs-protection
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,10 @@ if __name__ == '__main__':
))
sys.exit(1)

usr_fs_check()
# We currently use this script inside some jenkins pipelines that are not
# normal truenas install and so we need to skip the fs check on force.
if not args.force:
usr_fs_check()

rv = run([ZFS_CMD, 'get', '-o', 'value', '-H', 'truenas:developer', '/'], capture_output=True)

Expand Down

0 comments on commit 9e3a0db

Please sign in to comment.