mirror of
https://github.com/flatcar/scripts.git
synced 2025-11-24 12:01:59 +01:00
app-emulation/wa-linux-agent: Update Flatcar patch
When CoreosCommonUtil was factored out, we missed updating the class name in a call to super(). This results in an error when executing `/usr/sbin/waagent -force -deprovision+user`. Fix the class name. Create a compatibility symlink at the old config file location (/usr/share/oem/waagent.conf) to handle the case of enabling auto-updates on the agent. The upstream version of the agent does not have our downstream patch so doesn't know about the updated config file location. We should upstream our changes. Signed-off-by: Jeremi Piotrowski <jpiotrowski@microsoft.com>
This commit is contained in:
parent
8e46d15150
commit
f9a1e23a92
@ -115,7 +115,7 @@ index 00000000..66eae16e
|
||||
+ # User 'core' is not a sysuser.
|
||||
+ if username == 'core':
|
||||
+ return False
|
||||
+ return super(CoreOSUtil, self).is_sys_user(username)
|
||||
+ return super(CoreosCommonUtil, self).is_sys_user(username)
|
||||
+
|
||||
+ def is_dhcp_enabled(self):
|
||||
+ return True
|
||||
@ -404,7 +404,7 @@ new file mode 100644
|
||||
index 00000000..d0d6f7c8
|
||||
--- /dev/null
|
||||
+++ b/init/flatcar/waagent.service
|
||||
@@ -0,0 +1,30 @@
|
||||
@@ -0,0 +1,31 @@
|
||||
+[Unit]
|
||||
+Description=Microsoft Azure Linux Agent
|
||||
+Wants=network-online.target sshd.service sshd-keygen.service
|
||||
@ -419,6 +419,7 @@ index 00000000..d0d6f7c8
|
||||
+# /usr/share/flatcar/etc.
|
||||
+#
|
||||
+ExecStartPre=/bin/bash -c 'if [[ ! -e /etc/waagent.conf ]]; then ln -sf ../usr/share/waagent/waagent.conf /etc/waagent.conf; fi'
|
||||
+ExecStartPre=/bin/bash -c 'if [[ ! -e /oem/waagent.conf ]]; then ln -sf /etc/waagent.conf /oem/waagent.conf; fi'
|
||||
+
|
||||
+# This could be done also with:
|
||||
+#
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user