| 455 | check_usretc, |
| 456 | ); |
| 457 | fn check_usretc(root: &Dir, _config: &LintExecutionConfig) -> LintResult { |
| 458 | let etc_exists = root.symlink_metadata_optional("etc")?.is_some(); |
| 459 | // For compatibility/conservatism don't bomb out if there's no /etc. |
| 460 | if !etc_exists { |
| 461 | return lint_ok(); |
| 462 | } |
| 463 | // But having both /etc and /usr/etc is not something we want to support. |
| 464 | if root.symlink_metadata_optional("usr/etc")?.is_some() { |
| 465 | return lint_err( |
| 466 | "Found /usr/etc - this is a bootc implementation detail and not supported to use in containers", |
| 467 | ); |
| 468 | } |
| 469 | lint_ok() |
| 470 | } |
| 471 | |
| 472 | /// Validate that we can parse the /usr/lib/bootc/kargs.d files. |
| 473 | #[distributed_slice(LINTS)] |