From 0c11771694dc57063efb517420e038004c2b84fa Mon Sep 17 00:00:00 2001 From: Sylvain Pineau Date: Fri, 29 Sep 2017 11:24:18 +0200 Subject: 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 --- units/info/jobs.pxu | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'units') 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 -- cgit v1.2.3