remctl support for renaming machines
[invirt/packages/invirt-remote.git] / files / usr / sbin / remctl-update.sh
index 79c860a..7b205bf 100755 (executable)
@@ -80,6 +80,13 @@ case "$1" in
        rm -f "$MACHINEDIR"/"$machine"
        "$0" web
        ;;
+    moveregister)
+        oldmachine="$2"
+        newmachine="$3"
+        mv "$ACLDIR"/"$oldmachine" "$ACLDIR"/"$newmachine"
+        rm -f "$MACHINEDIR"/"$oldmachine"
+        "$0" web
+       ;;
     register)
        machine="$2"
        if [ "$machine" == "Domain-0" ]; then