diff options
author | Sylvain Pineau <sylvain.pineau@canonical.com> | 2017-09-29 11:24:18 +0200 |
---|---|---|
committer | Sylvain Pineau <sylvain.pineau@canonical.com> | 2017-09-29 11:24:18 +0200 |
commit | 0c11771694dc57063efb517420e038004c2b84fa (patch) | |
tree | ac3ffa1ed552900b6e60010339f6b980334b7234 | |
parent | 1b90e960b7096bd2d30e5a2c28381f11fcd6f0dc (diff) |
Update info/buildstamp attachment job to work on snappy
To keep the parsing logic (only keep the second line of the file), the command for snappy is: echo && date -r /var/lib/snapd/seed/seed.yaml -R
-rw-r--r-- | units/info/jobs.pxu | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/units/info/jobs.pxu b/units/info/jobs.pxu index 0588e26..12ad318 100644 --- a/units/info/jobs.pxu +++ b/units/info/jobs.pxu @@ -340,9 +340,14 @@ plugin: attachment category_id: com.canonical.plainbox::info id: info/buildstamp estimated_duration: 0.1 -_description: Attaches the buildstamp identifier for the preinstalled OS -_summary: Attach /etc/buildstamp -command: [ -s /etc/buildstamp ] && cat /etc/buildstamp +_description: Attaches the buildstamp identifier for the OS +_summary: Attaches the buildstamp identifier for the OS +command: + if [ -s /etc/buildstamp ]; then + cat /etc/buildstamp + elif [ -e /var/lib/snapd/seed/seed.yaml ]; then + echo && date -r /var/lib/snapd/seed/seed.yaml -R + fi plugin: shell category_id: com.canonical.plainbox::info |