qubes-rpc-multiplexer: deprecate /etc/qubes_rpc, allow /usr/local
/usr/local resides in private.img, so it is possible to define per-appvm RPC Also, with the upcoming 3.0 release support for old (R1) paths is removed.
This commit is contained in:
parent
c33565b001
commit
6c0e567929
@ -6,23 +6,19 @@ exec 2>/tmp/qrexec-rpc-stderr.$$
|
|||||||
rm -f /tmp/qrexec-rpc-stderr.$$
|
rm -f /tmp/qrexec-rpc-stderr.$$
|
||||||
|
|
||||||
QUBES_RPC=/etc/qubes-rpc
|
QUBES_RPC=/etc/qubes-rpc
|
||||||
# XXX: Backward compatibility
|
LOCAL_QUBES_RPC=/usr/local/etc/qubes-rpc
|
||||||
DEPRECATED_QUBES_RPC=/etc/qubes_rpc
|
|
||||||
if ! [ $# = 2 ] ; then
|
if ! [ $# = 2 ] ; then
|
||||||
echo $0: bad argument count, usage: $0 SERVICE-NAME REMOTE-DOMAIN-NAME >&2
|
echo $0: bad argument count, usage: $0 SERVICE-NAME REMOTE-DOMAIN-NAME >&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
export QREXEC_REMOTE_DOMAIN="$2"
|
export QREXEC_REMOTE_DOMAIN="$2"
|
||||||
|
|
||||||
if [ -s "$QUBES_RPC/$1" ]; then
|
for CFG_FILE in $QUBES_RPC/"$1" $LOCAL_QUBES_RPC/"$1"; do
|
||||||
CFG_FILE=$QUBES_RPC/"$1"
|
if [ -s "$CFG_FILE" ]; then
|
||||||
elif [ -s "$DEPRECATED_QUBES_RPC/$1" ]; then
|
break
|
||||||
echo "$0: RPC service '$1' uses deprecated directory, please move to $QUBES_RPC" >&2
|
fi
|
||||||
CFG_FILE=$DEPRECATED_QUBES_RPC/"$1"
|
done
|
||||||
else
|
|
||||||
echo "$0: Cannot find service $1 file in $QUBES_RPC" >&2
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -x "$CFG_FILE" ] ; then
|
if [ -x "$CFG_FILE" ] ; then
|
||||||
exec "$CFG_FILE"
|
exec "$CFG_FILE"
|
||||||
|
Loading…
Reference in New Issue
Block a user