-
Notifications
You must be signed in to change notification settings - Fork 74
feat(live): Initial inst.dud=URI functionality #2182
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
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
c0f2cb4
Initial version of the Agama DUD service
kobliha a350af2
Initial version of the Agama DUD script
kobliha b7f054e
Update agama-installer.changes
kobliha 0af7910
Simplified agama-dud after the review
kobliha b082567
Changes from the review: agama-dud.service
kobliha 107e210
Merge branch 'master' into inst-dud-feature
kobliha File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| [Unit] | ||
| Description=Agama DUD | ||
|
|
||
| After=network-online.target | ||
|
|
||
| # and after we process agama params like info which can contain password | ||
| After=agama-cmdline-process.service | ||
| # the DUD should replace wrong self_update | ||
| After=agama-self-update.service | ||
|
|
||
| # before starting the Agama servers so they use the new packages | ||
| Before=agama-web-server.service | ||
| Before=agama.service | ||
| # before interactive password services | ||
| Before=live-password-dialog.service | ||
| Before=live-password-systemd.service | ||
|
|
||
| [Service] | ||
| Type=oneshot | ||
| Environment=TERM=linux | ||
| ExecStart=agama-dud | ||
| TTYReset=yes | ||
| TTYVHangup=yes | ||
| StandardInput=tty | ||
| TimeoutStartSec=infinity | ||
|
|
||
| [Install] | ||
| WantedBy=default.target | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| #!/bin/sh | ||
|
|
||
| # Experimental DUD funtionality for Agama | ||
| # | ||
| # Usage: inst.dud=URI [inst.dud=URI] | ||
| # | ||
| # This is a very simple version of the DUD functionality | ||
| # - There can be multiple inst.dud=URI entries, but... | ||
| # - All of them are considered to be RPMs | ||
| # - The script does not check if downloading succeeded | ||
| # - Or for any deps of the package | ||
| # - Of whether installation/upgrade succeeded | ||
| # - Does not restart itself if the script is updated | ||
|
|
||
| # check if there is any DUD | ||
| if ! grep -q "\b\(inst\|agama\)\.dud=.\+\b" /run/agama/cmdline.d/agama.conf; then | ||
| echo "No DUD present" | ||
kobliha marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| exit 0 | ||
| fi | ||
|
|
||
| for URI in `sed -n 's/\(.*[[:space:]]\|^\)\(inst\|agama\)\.dud=\([^[:space:]]\+\).*/\3/p' /run/agama/cmdline.d/agama.conf`; do | ||
kobliha marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| echo "Downloading DUD from" $URI | ||
| TMPDUD=`mktemp /tmp/agama-XXXXXXXXXX.rpm` | ||
| agama download $URI $TMPDUD; | ||
| rpm --upgrade --force --verbose --hash --noverify --nodeps --excludedocs $TMPDUD | ||
| rm $TMPDUD | ||
| done | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.