X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=plc.d%2Fdb;h=80c40092a39012eff1005fc71db7a67bab9f300d;hb=c1f01d2f9766b00f6ad9c6636378ee74659d9fcf;hp=8c0a2904b6ec9a7817c477327bf0344a33f3272c;hpb=0848c69c93c8d59501324d3ebe3c24104d857604;p=myplc.git diff --git a/plc.d/db b/plc.d/db index 8c0a290..80c4009 100755 --- a/plc.d/db +++ b/plc.d/db @@ -64,8 +64,6 @@ function restore_planetlab_db() if [ -n "$dumpfile" ] ; then [ -f "$dumpfile" ] && psql -a -U $PLC_DB_USER $PLC_DB_NAME < $dumpfile check - else - # XXX set error fi } @@ -110,10 +108,7 @@ function clean_dumps() check } -if [ "$PLC_DB_ENABLED" != "1" ] ; then - exit 0 -fi - +[ $PLC_DB_ENABLED -ne 1 ] && exit 0 case "$1" in start) MESSAGE=$"Bootstrapping the database" @@ -179,8 +174,14 @@ EOF result "$MESSAGE" ;; + stop) + MESSAGE="Ignoring request to stop myplc databases" + dialog "$MESSAGE" + result "" + ;; + *) - echo "Usage: $0 [start|migrate|dump|clean-dump]" + echo "Usage: $0 [start|migrate|dump|checkpoint|restore|clean-dump|stop]" exit 1 ;; esac