]> www.infradead.org Git - users/mchehab/rasdaemon.git/commit
ras-mc-ctl: Print useful message when run without rasdaemon -r
authorBetty Dall <betty.dall@hp.com>
Wed, 19 Mar 2014 21:54:56 +0000 (15:54 -0600)
committerMauro Carvalho Chehab <m.chehab@samsung.com>
Fri, 28 Mar 2014 21:19:55 +0000 (18:19 -0300)
commitcaa44c3946ddc900896830297c28b90ce5b9034b
treed4c3b0084bc96f63a85985d63d1043daf23a1702
parentd1b81490639f2608ecaf8fa50c24ac78c053fc2b
ras-mc-ctl: Print useful message when run without rasdaemon -r

The utility script ras-mc-ctl requires that rasdaemon --record be run
to create the me_event table in the SQLite database. The current behaviour
is this:
[root@sa1 util]# ras-mc-ctl --errors
DBD::SQLite::db prepare failed: no such table: mc_event at
/usr/local/sbin/ras-mc-ctl line 914.
Can't call method "execute" on an undefined value at
/usr/local/sbin/ras-mc-ctl line 915.

With this change, the user sees:
[root@sa1 util]# ras-mc-ctl --errors
DBD::SQLite::db prepare failed: no such table: mc_event at
/usr/local/sbin/ras-mc-ctl line 914.
ras-mc-ctl: Error: mc_event table missing from
/usr/local/var/lib/rasdaemon/ras-mc_event.db. Run 'rasdaemon --record'.

Signed-off-by: Betty Dall <betty.dall@hp.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
util/ras-mc-ctl.in