Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

autoyast with scripts init-script only results in invalid profile #1903

Open
jreidinger opened this issue Jan 15, 2025 · 1 comment
Open
Assignees

Comments

@jreidinger
Copy link
Contributor

Reported by Tone Jones:

xml content:

<scripts>
<init-scripts config:type="list">
<script>
<!--
 retrieving the scripts from FTP source doesn't work since YaST seems to
             retrieve the stuff before we have (again) network ... 
-->
<filename>02-install_scripts</filename>
<location/>
<source>
#!/bin/sh
mkdir /tmp/scripts cd /tmp/scripts
wget http://perf-vm-lp.arch.suse.cz/autoinst/scripts/after_install.sh
sh after_install.sh
rm -fr /tmp/scripts
</source>
</script>
<script>
<!--
 this script makes sure sshd gets started even if autoyast or systemd fail 
-->
<source>
systemctl enable sshd && systemctl start sshd
</source>
</script>
</init-scripts>
</scripts>

and resulting error

Jan 15 18:52:05 c243.arch.suse.de agama-auto[2813]: ✗ The profile is not valid. Please, check the following errors:
Jan 15 18:52:05 c243.arch.suse.de agama-auto[2813]:         * null is not of type "string". ValidationError { instance: Null, kind: Type { kind: Single(String) }, instance_path: JSONPointer([Property("scripts"), Property("init"), Index(0), Property("name")]), schema_path: JSONPointer([Keyword("properties"), Property("scripts"), Keyword("properties"), Property("init"), Keyword("items"), Keyword("properties"), Property("name"), Keyword("type")]) }
Jan 15 18:52:05 c243.arch.suse.de agama-auto[2813]:         * null is not of type "string". ValidationError { instance: Null, kind: Type { kind: Single(String) }, instance_path: JSONPointer([Property("scripts"), Property("init"), Index(1), Property("name")]), schema_path: JSONPointer([Keyword("properties"), Property("name"), Keyword("type")]) }
Jan 15 18:52:05 c243.arch.suse.de agama-auto[2813]: Anyhow(invalid type: null, expected a string at line 1 column 325)
@imobachgs
Copy link
Contributor

#1951 should fix this problem.

@jreidinger jreidinger self-assigned this Jan 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants