scripts/forensic-mark-readonly: support standalone usage and configuration file usage
authorMichael Prokop <mika@grml.org>
Fri, 10 Jul 2020 08:01:17 +0000 (10:01 +0200)
committerMichael Prokop <mika@grml.org>
Fri, 10 Jul 2020 08:01:17 +0000 (10:01 +0200)
Instead of accepting environment variable $DEVNAME we expect the
script to be invoked with and argument like /dev/sda1 (useful for
manual execution) or sda1 (when invoked via udev rule).

Support configuration via /etc/grml/forensic.conf with two variables:

* READONLY_MODE: if set to "disable" then the script won't modify
  block devices

* READONLY_IGNORE: this supports ignoring devices to not being set to
  read-only

While at it improve coding style.

This work was funded by Grml-Forensic.


No differences found