Page MenuHomeFreeBSD

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

Authored by mr on Thu, Apr 17, 11:20 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Apr 19, 11:18 AM
Unknown Object (File)
Sat, Apr 19, 9:58 AM
Unknown Object (File)
Sat, Apr 19, 6:12 AM
Unknown Object (File)
Sat, Apr 19, 5:58 AM
Unknown Object (File)
Sat, Apr 19, 12:51 AM
Unknown Object (File)
Fri, Apr 18, 9:30 PM
Unknown Object (File)
Fri, Apr 18, 7:59 PM
Unknown Object (File)
Fri, Apr 18, 6:31 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.Thu, Apr 17, 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..Thu, Apr 17, 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.Thu, Apr 17, 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!