Index: Makefile ================================================================== --- Makefile +++ Makefile @@ -32,12 +32,12 @@ $(INSTALL) -c -m 644 -o root find_free_port.1 $(DESTDIR)$(mandir)/man1 $(INSTALL) -c -m 644 -o root vws.service $(DESTDIR)$(systemddir) $(INSTALL) -c -m 644 -o root vws.init $(DESTDIR)$(initddir)/vws origtarball: vws find_free_port vws.init vws.service.in Makefile vws.conf vws.mkd find_free_port.mkd .pylintrc README.md - version=$$(sed -n 's/VERSION = //p' vws); \ + version=$$(sed -n 's/VERSION = "\?\([^"]\+\)"\?/\1/p' vws); \ mkdir vws-$$version; cp $+ vws-$$version; \ tar cjf ../vws_$$version.orig.tar.bz2 vws-$$version; \ rm -rf vws-$$version deb: origtarball debuild Index: debian/changelog ================================================================== --- debian/changelog +++ debian/changelog @@ -1,5 +1,11 @@ +vws (0.8.1-1) UNRELEASED; urgency=medium + + * Support of new info-network output style + + -- Victor Wagner Thu, 28 Jul 2022 18:04:45 +0300 + vws (0.8-1) unstable; urgency=medium * Switch to python3 -- Victor Wagner Tue, 01 Oct 2019 22:07:09 +0300 Index: debian/files ================================================================== --- debian/files +++ debian/files @@ -1,2 +1,2 @@ -vws_0.8-1_all.deb otherosfs optional -vws_0.8-1_amd64.buildinfo otherosfs optional +vws_0.8.1-1_all.deb otherosfs optional +vws_0.8.1-1_amd64.buildinfo otherosfs optional Index: vws ================================================================== --- vws +++ vws @@ -17,11 +17,11 @@ import sys import time import pwd import grp -VERSION = 0.8 +VERSION = "0.8.1" def find_vm(name): """ Search and return VM directory """ search_path = [os.path.join(pwd.getpwuid(os.getuid()).pw_dir, "VWs"), config.get("directories", "SharedVMs"), config.get("directories", "AutostartVMs")] @@ -144,10 +144,11 @@ result.append(match.group(1)) return result def snapshot_mode(sock): """ Returns True if VM is running in snapshot mode """ + print("Entering snapshot_mode", file=sys.stderr) answer = send_command(sock, "info block") return re.search(": /tmp", answer) is not None def read_netinfo(filename): """ Reads network information from start script """ @@ -172,10 +173,14 @@ return {"iface":match.group(1), "mac":match.group(2)} match = re.search("user.0:.*net=([^,]+).*\n.*macaddr=(\\S+)", answer) if match: return {"iface":"user", "ip":match.group(1), "mac":match.group(2)} + match = re.search("hub0port1:.*.br=(\\S+).*hub0port0:.*macaddr=(\\S+)", + answer, flags=re.S) + if match: + return {"iface":match.group(1), "mac":match.group(2)} print(answer, file=sys.stderr) return {"iface":"unknown", "ip":"?", "mac":"?", "card":"?"} # # command implementation # @@ -290,10 +295,11 @@ elif not options.stopped: print("VM already running use uri %s" % uri, file=sys.stderr) def cmd_stop(options): """ vws stop """ + print("entering cmd_stop", file=sys.stderr) if options.hard or snapshot_mode(options.sock): try: send_command(options.sock, 'quit') except IOError as ex: # Expect IOError here