From f2cf6933b9b2b6b5c6b320dee24246510dd7ca55 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Wed, 15 Apr 2015 18:52:42 +0200 Subject: [PATCH] prepare-dvm: fix bashism $(( )) is POSIX syntax for shell arithmetic operations. Especially dash (default shell in Debian) doesn't support $[ ]. --- vm-systemd/prepare-dvm.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vm-systemd/prepare-dvm.sh b/vm-systemd/prepare-dvm.sh index 04a9e1f..2cde111 100755 --- a/vm-systemd/prepare-dvm.sh +++ b/vm-systemd/prepare-dvm.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash possibly_run_save_script() { @@ -17,7 +17,7 @@ if true; then qubesdb-watch /qubes-restore-complete & watch_pid=$! free | grep Mem: | - (read label total used free shared buffers cached; qubesdb-write /qubes-used-mem $[ $used + $cached ]) + (read label total used free shared buffers cached; qubesdb-write /qubes-used-mem $(( $used + $cached )) ) # we're still running in DispVM template echo "Waiting for save/restore..." qubesdb-read /qubes-restore-complete || wait $watch_pid