feat: strengthen wipe safety checks and confirmation flow
Add mounted/in-use device detection, show detailed device info before confirmation, and require an exact wipe phrase to proceed. Also move status output to stderr and refresh the usage warnings for clearer destructive-action guidance.
This commit is contained in:
@@ -9,6 +9,8 @@ description: mtm-ddwipe project conventions
|
||||
- Strengthen destructive-action safety checks in `mtm-ddwipe`.
|
||||
- Keep `mtm-ddwipe` interactive by default.
|
||||
- Require explicit confirmation before destructive actions.
|
||||
- Show clear device details before confirmation.
|
||||
- Check that target devices are not mounted or in use before wiping.
|
||||
- Keep user-facing messages short and clear.
|
||||
- Keep error and help messages short and clear.
|
||||
- Prefer minimal, focused changes that preserve intent.
|
||||
@@ -18,12 +20,13 @@ description: mtm-ddwipe project conventions
|
||||
- `mtm-ddwipe` must print a usage line and support `-h`/`--help`.
|
||||
- Validate that wipe targets are real block devices before operating on them.
|
||||
- Keep short, explicit confirmation prompts before destructive operations.
|
||||
- Prefer confirmation prompts that require typing the target device path.
|
||||
- Keep help text concise and usage-first.
|
||||
- Prefer confirmation prompts that require typing the target device path or an exact safety phrase.
|
||||
- Keep help text concise, usage-first, and warning-focused.
|
||||
- Keep destructive safeguards strict and explicit.
|
||||
- If adding non-interactive support, make it an opt-in safety flag.
|
||||
- Keep device identification prompts clear and specific.
|
||||
- Preserve the fallback wipe flow: secure discard, zero discard, then zero-fill with `dd`.
|
||||
- Keep timing and status output short and readable.
|
||||
|
||||
# Project identity
|
||||
- Main script: `mtm-ddwipe`
|
||||
|
||||
Reference in New Issue
Block a user