summaryrefslogtreecommitdiff
path: root/units/info
diff options
authorSylvain Pineau <sylvain.pineau@canonical.com>2017-09-29 11:24:18 +0200
committerSylvain Pineau <sylvain.pineau@canonical.com>2017-09-29 11:24:18 +0200
commit0c11771694dc57063efb517420e038004c2b84fa (patch)
treeac3ffa1ed552900b6e60010339f6b980334b7234 /units/info
parent1b90e960b7096bd2d30e5a2c28381f11fcd6f0dc (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
Diffstat (limited to 'units/info')
-rw-r--r--units/info/jobs.pxu11
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