From a6a1a5f9bba5e7eb404d668787394d51e4829321 Mon Sep 17 00:00:00 2001 From: Bob Gilligan Date: Mon, 4 Jan 2010 14:27:49 -0800 Subject: Indicate when system was booted via image. --- scripts/vyatta-show-version | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'scripts') diff --git a/scripts/vyatta-show-version b/scripts/vyatta-show-version index f8f291a..64f8aa0 100755 --- a/scripts/vyatta-show-version +++ b/scripts/vyatta-show-version @@ -158,7 +158,12 @@ my $booted = `grep -e '^unionfs.*/filesystem.squashfs' -e '^aufs.*/filesystem.sq if (defined($booted) && $booted ne "") { $booted="livecd"; } else { - $booted="disk"; + my $image_boot = `grep -e '^unionfs / unionfs.*squashfs=ro' /proc/mounts`; + if ($image_boot ne "") { + $booted="image"; + } else { + $booted="disk"; + } } print "Boot via : $booted\n"; my $uptime = `uptime`; -- cgit v1.2.3