File tree Expand file tree Collapse file tree
sdk_container/src/third_party/coreos-overlay/coreos
user-patches/sys-apps/systemd Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -35,13 +35,8 @@ d /etc/zfs 0755 root root -
3535L /etc/zfs/zed.d - - - - /usr/share/zfs/etc/zfs/zed.d
3636L /etc/zfs/zfs-functions - - - - /usr/share/zfs/etc/zfs/zfs-functions
3737L /etc/zfs/zpool.d - - - - /usr/share/zfs/etc/zfs/zpool.d
38- C /etc/systemd/system/systemd-udevd.service.d/10-zfs.conf - - - - /usr/lib/systemd/system/systemd-udevd.service.d/10-zfs.conf
38+ r /etc/systemd/system/systemd-udevd.service.d/10-zfs.conf - - - - -
3939EOF
4040
41- mkdir -p ./usr/lib/systemd/system/systemd-udevd.service.d
42- cat << EOF >./usr/lib/systemd/system/systemd-udevd.service.d/10-zfs.conf
43- [Unit]
44- After=systemd-sysext.service
45- EOF
4641configure_modprobe flatcar-zfs
4742popd
Original file line number Diff line number Diff line change @@ -289,11 +289,19 @@ for entry in "${BUILD_DIR}/${FLAGS_install_root_basename}"/*; do
289289 rm -rf " ${entry} "
290290done
291291
292+ EXTENSION_RELOAD_MANAGER=0
293+ [[ -d ${BUILD_DIR} /${FLAGS_install_root_basename} /usr/lib/systemd ]] && EXTENSION_RELOAD_MANAGER=1
294+
295+ EXTENSION_RESTART_UNITS=()
296+ [[ -d ${BUILD_DIR} /${FLAGS_install_root_basename} /usr/lib/tmpfiles.d ]] && EXTENSION_RESTART_UNITS+=( systemd-tmpfiles-setup-again.service )
297+ [[ -d ${BUILD_DIR} /${FLAGS_install_root_basename} /usr/lib/udev/rules.d ]] && EXTENSION_RESTART_UNITS+=( systemd-udev-trigger.service )
298+
292299grep . << EOF | install -m0644 -D /dev/stdin "${BUILD_DIR} /${FLAGS_install_root_basename} /usr/lib/extension-release.d/extension-release.${SYSEXT_ID} "
293300ID='flatcar'
294301${VERSION_FIELD_OVERRIDE:- VERSION_ID} =${FLATCAR_VERSION_ID@ Q}
295302ARCHITECTURE=${ARCH@ Q}
296- EXTENSION_RELOAD_MANAGER=1
303+ EXTENSION_RELOAD_MANAGER=${EXTENSION_RELOAD_MANAGER}
304+ EXTENSION_RESTART_UNITS='${EXTENSION_RESTART_UNITS[*]} '
297305SYSEXT_ID=${SYSEXT_ID@ Q}
298306${SYSEXT_NAME: +SYSEXT_NAME=${SYSEXT_NAME@ Q} }
299307${PVR: +SYSEXT_VERSION_ID=${PVR@ Q} }
Original file line number Diff line number Diff line change 168168
169169[Service]
170170SystemCallFilter=@mount
171+ EOF
172+ )
173+
174+ (
175+ insinto "$(systemd_get_systemunitdir)/systemd-udev-trigger.service.d"
176+ newins - flatcar.conf <<'EOF'
177+ # Ensure udev rules are reloaded before triggering events with them because
178+ # udevd caches its rules for 3 seconds. System extensions that include udev
179+ # rules need them immediately loaded before triggering.
180+
181+ [Service]
182+ ExecStartPre=-udevadm control --reload
183+ EOF
184+
185+ insinto "$(systemd_get_systemunitdir)"
186+ newins - systemd-tmpfiles-setup-again.service <<'EOF'
187+ # System extensions that include tmpfiles.d configuration can restart this
188+ # service to have it processed when merging.
189+
190+ [Unit]
191+ Description=Create System Files and Directories After Booting
192+ Documentation=man:tmpfiles.d(5) man:systemd-tmpfiles(8)
193+
194+ [Service]
195+ Type=oneshot
196+ RemainAfterExit=yes
197+ ExecStart=systemd-tmpfiles --create --remove --exclude-prefix=/dev
198+ SuccessExitStatus=DATAERR CANTCREAT
199+ ImportCredential=tmpfiles.*
200+ RestrictSUIDSGID=no
171201EOF
172202 )
173203}
You can’t perform that action at this time.
0 commit comments