summaryrefslogtreecommitdiff
path: root/files/common
diff options
context:
space:
mode:
Diffstat (limited to 'files/common')
-rwxr-xr-xfiles/common/sbin/p2ptbl9
1 files changed, 9 insertions, 0 deletions
diff --git a/files/common/sbin/p2ptbl b/files/common/sbin/p2ptbl
index a728a9c..e30a7d0 100755
--- a/files/common/sbin/p2ptbl
+++ b/files/common/sbin/p2ptbl
@@ -13,6 +13,10 @@ get () {
grep "^$2"$'\t' "$1" | cut -f3-
}
+show () {
+ cut -f1,3- "$1"
+}
+
update () {
[ -n "$2" -a -n "$3" ] || printArgs
oldversion=$(grep "^$2"$'\t' "$1" | cut -f2)
@@ -80,6 +84,7 @@ printArgs () {
echo -e "Usage:
$0 init table
$0 get table key
+$0 show table
$0 update table key value [interface]
$0 merge table foreign-table
$0 gossip table target-size interface"
@@ -108,6 +113,10 @@ case "$1" in
lockTable -s "$2"
get "$2" "$3"
;;
+ show)
+ lockTable -s "$2"
+ show "$2"
+ ;;
update)
lockTable -s "$2"
update "$2" "$3" "$4" "$5"
contact: Jan Huwald // Impressum