summarylogtreecommitdiffstats
path: root/gpm-vm
blob: f2e1cf7803015b16c6d18ab9754313ee357d6f78 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/usr/bin/bash

conf="/etc/gpm-vm.conf"

if [[ ! -f "${conf}" ]]; then
   echo "'${conf}' does not exist"
   exit 1
fi

source "${conf}"

if [[ ! -v event ]]; then
   echo "'event' is not set in '${conf}'"
   exit 1
fi

if [[ ! -c "${event}" ]]; then
   echo "'${event}' does not exist or is not a character device"
   exit 1
fi

/usr/bin/gpm -m "${event}" -t vbox