dispvm: simplify DispVM preparation script
This commit is contained in:
parent
8dda7cf884
commit
7a639911f8
@ -1,15 +1,15 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -o pipefail
|
||||
|
||||
get_encoded_script()
|
||||
{
|
||||
ENCODED_SCRIPT=`
|
||||
if [ "$1" == "vm-default" ]; then
|
||||
SCRIPT_CMD="echo /usr/lib/qubes/dispvm-prerun.sh"
|
||||
elif ! [ -f "$1" ] ; then
|
||||
echo $1 is not a file ?
|
||||
exit 1
|
||||
echo /usr/lib/qubes/dispvm-prerun.sh
|
||||
else
|
||||
SCRIPT_CMD="cat $1"
|
||||
fi
|
||||
ENCODED_SCRIPT=`$SCRIPT_CMD | perl -e 'use MIME::Base64 qw(encode_base64); local($/) = undef;print encode_base64(<STDIN>)'|tr -d "\n"`
|
||||
cat "$1"
|
||||
fi | base64 -w0` || exit 1
|
||||
}
|
||||
|
||||
if [ $# != 2 -a $# != 3 ] ; then
|
||||
|
Loading…
Reference in New Issue
Block a user