mirror of
https://github.com/truenas/scale-build.git
synced 2026-02-14 23:18:59 +00:00
NAS-138810 / 26.04 / Update truenas_verify to not report nfs.conf.d (#952)
* Exclude /etc/nfs.conf.d. This directory is removed by nfs.conf.mako. * Add exception handling for os.unlink when processing objects that are aleady missing.
This commit is contained in:
@@ -26,6 +26,7 @@ ETC_FILES_TO_REMOVE = [
|
||||
'etc/krb5.conf',
|
||||
'etc/mailname',
|
||||
'etc/motd',
|
||||
'etc/nfs.conf.d',
|
||||
'etc/nscd.conf',
|
||||
'etc/resolv.conf',
|
||||
'etc/avahi/avahi-daemon.conf',
|
||||
@@ -136,7 +137,12 @@ def generate_mtree(target_root_dir, version):
|
||||
# we replace when we etc.generate. If they're not required for
|
||||
# first boot, then remove from update file.
|
||||
for file in ETC_FILES_TO_REMOVE:
|
||||
os.unlink(os.path.join(target_root_dir, file))
|
||||
try:
|
||||
os.unlink(os.path.join(target_root_dir, file))
|
||||
except FileNotFoundError:
|
||||
# We want to avoid failing the build if the object is
|
||||
# aleady removed. Possibly time to update the list.
|
||||
pass
|
||||
|
||||
# Some files and/or directories get their permission mode changed
|
||||
# after install. We preemptively make those mode changes here
|
||||
|
||||
Reference in New Issue
Block a user