source: tags/0.58/stoposdump @ 9

Last change on this file since 9 was 9, checked in by willem, 11 years ago

willem

  • Property svn:executable set to *
File size: 501 bytes
Line 
1#!/bin/bash
2usage()
3{
4  echo "Usage: $0 [-p pool]"
5}
6if [ "$1" = "-h" ]; then
7  usage
8  exit 0
9fi
10if [ "$1" = "-p" ]; then
11  f="$1"
12  shift
13  pool="$2"
14  p="$2"
15  shift
16fi
17if [ -n "$1" ]; then
18  usage
19  exit 1
20fi
21
22while true ; do
23  if [ -n "$pool" ] ; then
24    eval "`./stoposclient -p "$pool" dump 2>/dev/null`"
25  else
26    eval "`./stoposclient dump 2>/dev/null`"
27  fi
28  if [ "$STOPOS_RC" != "OK" ] ; then
29    break
30  fi
31  printf '%s\t%s\t%s\n' "$STOPOS_KEY" "$STOPOS_COMMITTED" "$STOPOS_VALUE"
32done
Note: See TracBrowser for help on using the repository browser.