prepare-dvm: fix bashism

$(( )) is POSIX syntax for shell arithmetic operations. Especially dash
(default shell in Debian) doesn't support $[ ].
This commit is contained in:
Marek Marczykowski-Górecki 2015-04-15 18:52:42 +02:00
parent ab38410f5c
commit f2cf6933b9

View File

@ -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