Page MenuHomeFreeBSD

Use ln -sf otherwise nanobsd.sh -wkWK failssince the etc link exists already.
ClosedPublic

Authored by mr on Apr 17 2025, 11:20 AM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Oct 13, 7:30 AM
Unknown Object (File)
Sat, Oct 11, 2:12 PM
Unknown Object (File)
Sep 15 2025, 8:25 PM
Unknown Object (File)
Sep 15 2025, 5:30 PM
Unknown Object (File)
Sep 15 2025, 2:14 PM
Unknown Object (File)
Sep 10 2025, 8:32 AM
Unknown Object (File)
Sep 2 2025, 4:44 PM
Unknown Object (File)
Aug 29 2025, 5:22 PM
Subscribers

Details

Summary

Before creating the nanobsd image nanobsd.sh creates a soft link for
usr/local/etc in the function setup_nanobsd()
This fails if the link already exists (when using nanobsd.sh -wkWK)

Test Plan

Run nanobsd.sh -c someconfig and then nanobsd.sh -wkWK -c someconfig
which fails.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

mr requested review of this revision.Apr 17 2025, 11:20 AM
mr created this revision.
mr retitled this revision from Use ln -sf otherwise nanobsd.sh -wkWK fails since the etc link exists already. to Use ln -sf otherwise nanobsd.sh -wkWK failssince the etc link exists already..Apr 17 2025, 11:24 AM
mr edited the summary of this revision. (Show Details)
mr edited the test plan for this revision. (Show Details)

That's kinda obscure... But this is harmless and likely good defensive programming...
and it makes sense for the 'rebuild' cases which in spots are poorly thought out.

This revision is now accepted and ready to land.Apr 17 2025, 1:23 PM
This revision was automatically updated to reflect the committed changes.

I was not able to reproduce the failure. But it is safe to always have it, just like rm -f, when the user has -i aliased to rm and ln (e.g., `alias rm='rm -i' uncommented in the "be paranoid" section).
This change should not get reverted with D48782, as it does essentially the same thing.
Thank you!