Skip to content

Remove dead EXTERNAL_STORAGE_UUID from config.conf.template #45

@smartwatermelon

Description

@smartwatermelon

Problem

config/config.conf.template defines EXTERNAL_STORAGE_UUID="" (line 30), but nothing reads it. setup-external-automount.sh always derives the UUID from EXTERNAL_STORAGE_VOLUME at install time via diskutil info -plist | plutil -extract VolumeUUID. The config variable is dead code.

Discovery

Flagged as a non-blocking finding by the remote reviewer during PR #44:

EXTERNAL_STORAGE_UUID is added to config.conf.template but is never read by setup-external-automount.sh, which always auto-discovers the UUID via diskutil. The config var is dead code, but it causes no behavioral problem.

History

The variable was introduced in commit b8770cd feat(config): add EXTERNAL_STORAGE_UUID to config template when the original design expected a pre-configured UUID in config.conf. The post-deploy simplification (27e8aa7 refactor(automount): simplify to minimal plist; drop helper + banner) moved UUID discovery into the setup script itself, making the config entry redundant. The config-template entry was left in place.

Proposed scope

Remove the dead variable. One required change, one optional:

  • Required: delete EXTERNAL_STORAGE_UUID="" from config/config.conf.template (and its preceding comment, if any)
  • Optional: update docs/specs/2026-04-24-external-storage-automount-design.md line 329 (EXTERNAL_STORAGE_UUID="" # auto-discovered by setup-external-automount.sh) to remove the stale config example. The plan doc (docs/plans/2026-04-24-...) references the variable throughout its task-by-task walkthrough; those references are historical and can stay as a record of the design process — no action needed there.

Acceptance criteria

  • grep EXTERNAL_STORAGE_UUID config/config.conf.template returns nothing
  • Fresh install on a clean target (or dry-run) still succeeds — no code path depended on the variable
  • Shellcheck clean on any touched scripts (probably none)

Non-goals

  • Don't rewrite historical plan/design docs beyond the one outdated example above
  • Don't change setup-external-automount.sh behavior — auto-discovery is the intended design

Metadata

Metadata

Assignees

No one assigned

    Labels

    tech-debtTechnical debt to address

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions