dispvm: don't use perl to decode base64-encoded script
This looks like an overkill. And more importantly - required modules are not installed by default, making it impossible to use in default minimal template. Fixes QubesOS/qubes-issues#1610
This commit is contained in:
parent
13c99f1f10
commit
9a7dee5b46
@ -38,7 +38,7 @@ possibly_run_save_script() {
|
|||||||
ENCODED_SCRIPT=$(qubesdb-read /qubes-save-script)
|
ENCODED_SCRIPT=$(qubesdb-read /qubes-save-script)
|
||||||
if [ -z "$ENCODED_SCRIPT" ] ; then return ; fi
|
if [ -z "$ENCODED_SCRIPT" ] ; then return ; fi
|
||||||
tmpfile=$(mktemp /tmp/qubes-save-script.XXXXXXXXX)
|
tmpfile=$(mktemp /tmp/qubes-save-script.XXXXXXXXX)
|
||||||
echo $ENCODED_SCRIPT|perl -e 'use MIME::Base64 qw(decode_base64); local($/) = undef;print decode_base64(<STDIN>)' >"$tmpfile"
|
echo $ENCODED_SCRIPT|base64 -d >"$tmpfile"
|
||||||
chmod 755 "$tmpfile"
|
chmod 755 "$tmpfile"
|
||||||
DISPLAY=:0 su - user -c "$tmpfile"
|
DISPLAY=:0 su - user -c "$tmpfile"
|
||||||
ret=$?
|
ret=$?
|
||||||
|
Loading…
Reference in New Issue
Block a user