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)
Wed, Aug 20, 7:04 PM
Unknown Object (File)
Sun, Aug 17, 12:05 PM
Unknown Object (File)
Thu, Aug 14, 10:24 AM
Unknown Object (File)
Wed, Aug 6, 7:57 PM
Unknown Object (File)
Sat, Aug 2, 6:34 PM
Unknown Object (File)
Sat, Jul 26, 7:44 PM
Unknown Object (File)
Jul 17 2025, 10:05 AM
Unknown Object (File)
Jul 8 2025, 2:08 AM
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 Skipped
Unit
Tests Skipped
Build Status
Buildable 63560
Build 60444: arc lint + arc unit

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!