From: Frank Brehm Date: Sun, 17 May 2020 09:58:41 +0000 (+0200) Subject: committing changes in /etc after apt run X-Git-Url: https://git.uhu-banane.org/?a=commitdiff_plain;h=274a1cf100942b5a570aaadd8dad45b82ffee2f7;p=config%2Fbruni%2Fetc-mint-new1.git committing changes in /etc after apt run Package changes: +libvde0 2.3.2+r586-2.1build1 amd64 +libvdeplug2 2.3.2+r586-2.1build1 amd64 +vde2 2.3.2+r586-2.1build1 amd64 --- diff --git a/.etckeeper b/.etckeeper index 19fbb29..b377a99 100755 --- a/.etckeeper +++ b/.etckeeper @@ -2374,9 +2374,11 @@ maybe chmod 0755 'network/if-down.d/openvpn' maybe chmod 0755 'network/if-down.d/postfix' maybe chmod 0755 'network/if-post-down.d' maybe chmod 0755 'network/if-post-down.d/chrony' +maybe chmod 0755 'network/if-post-down.d/vde2' maybe chmod 0755 'network/if-post-down.d/wireless-tools' maybe chmod 0755 'network/if-pre-up.d' maybe chmod 0755 'network/if-pre-up.d/ethtool' +maybe chmod 0755 'network/if-pre-up.d/vde2' maybe chmod 0755 'network/if-pre-up.d/wireless-tools' maybe chmod 0755 'network/if-up.d' maybe chmod 0755 'network/if-up.d/avahi-autoipd' @@ -2961,6 +2963,13 @@ maybe chmod 0755 'upstream-release' maybe chmod 0644 'upstream-release/lsb-release' maybe chmod 0644 'usb_modeswitch.conf' maybe chmod 0755 'usb_modeswitch.d' +maybe chmod 0755 'vde2' +maybe chmod 0755 'vde2/libvdemgmt' +maybe chmod 0644 'vde2/libvdemgmt/asyncrecv.rc' +maybe chmod 0644 'vde2/libvdemgmt/closemachine.rc' +maybe chmod 0644 'vde2/libvdemgmt/openmachine.rc' +maybe chmod 0644 'vde2/libvdemgmt/sendcmd.rc' +maybe chmod 0644 'vde2/vdecmd' maybe chmod 0644 'vdpau_wrapper.cfg' maybe chmod 0755 'vim' maybe chmod 0644 'vim/gvimrc' diff --git a/group b/group index f9e8e0a..f52e5c2 100644 --- a/group +++ b/group @@ -83,3 +83,4 @@ stapusr:x:141: stapsys:x:142: wireshark:x:143: ulog:x:144: +vde2-net:x:145: diff --git a/group- b/group- index ad8b824..f9e8e0a 100644 --- a/group- +++ b/group- @@ -82,3 +82,4 @@ stapdev:x:140: stapusr:x:141: stapsys:x:142: wireshark:x:143: +ulog:x:144: diff --git a/gshadow b/gshadow index 8611f45..e6afd72 100644 --- a/gshadow +++ b/gshadow @@ -83,3 +83,4 @@ stapusr:!:: stapsys:!:: wireshark:!:: ulog:!:: +vde2-net:!:: diff --git a/gshadow- b/gshadow- index 8081d48..8611f45 100644 --- a/gshadow- +++ b/gshadow- @@ -82,3 +82,4 @@ stapdev:!:: stapusr:!:: stapsys:!:: wireshark:!:: +ulog:!:: diff --git a/network/if-post-down.d/vde2 b/network/if-post-down.d/vde2 new file mode 100755 index 0000000..db76234 --- /dev/null +++ b/network/if-post-down.d/vde2 @@ -0,0 +1,37 @@ +#!/bin/sh + +VDE_SWITCH=/usr/bin/vde_switch +SLIRPVDE=/usr/bin/slirpvde + +# this is not an interesting stanza for us +if [ -z "$IF_VDE2_SWITCH" -a -z "$IF_VDE2_PLUG" -a -z "$IF_VDE2_SLIRP" ]; then + exit 0 +fi + +PIDFILE="/var/run/vde2/$IFACE-plug.pid" +CTLFILE="/var/run/vde2/$IFACE.ctl" +if [ -f $PIDFILE ]; then + start-stop-daemon --stop --quiet --pidfile $PIDFILE + rm -f $PIDFILE +fi + +PIDFILE="/var/run/vde2/$IFACE-slirp.pid" +if [ -f $PIDFILE ]; then + start-stop-daemon --stop --quiet --pidfile $PIDFILE \ + --oknodo --exec $SLIRPVDE + rm -f $PIDFILE +fi + +PIDFILE="/var/run/vde2/$IFACE.pid" +CTLDIR="/var/run/vde2/$IFACE.ctl" +if [ -f $PIDFILE ]; then + start-stop-daemon --stop --quiet --pidfile $PIDFILE \ + --oknodo --exec $VDE_SWITCH + rm -f $PIDFILE + + # set the tap interface to non-persistant, see #568363 + vde_tunctl -b -d $IFACE 1>/dev/null +fi + +rm -rf $CTLDIR +rm -f $CTLDIR.* diff --git a/network/if-pre-up.d/vde2 b/network/if-pre-up.d/vde2 new file mode 100755 index 0000000..991b382 --- /dev/null +++ b/network/if-pre-up.d/vde2 @@ -0,0 +1,74 @@ +#!/bin/sh + +VDE_SWITCH=/usr/bin/vde_switch +VDE_PLUG=/usr/bin/vde_plug +SLIRPVDE=/usr/bin/slirpvde +DPIPE=/usr/bin/dpipe +RUNDIR=/var/run/vde2 + +USER=vde2-net +GROUP=vde2-net + +if [ ! -x $VDE_SWITCH ] || [ ! -x $SLIRPVDE ]; then + exit 0 +fi + +# this is not an interesting stanza for us +if [ -z "$IF_VDE2_SWITCH" -a -z "$IF_VDE2_PLUG" -a -z "$IF_VDE2_SLIRP" ]; then + exit 0 +fi + + +# Create directory if missing +if [ ! -d $RUNDIR ]; then + mkdir -p $RUNDIR + chown vde2-net:vde2-net $RUNDIR + chmod 2770 $RUNDIR +fi + +# vde2-switch [-|] +if [ -n "$IF_VDE2_SWITCH" ]; then + set -- $IF_VDE2_SWITCH + test "$1" = "-" && shift + PIDFILE="$RUNDIR/$IFACE.pid" + CTLDIR="$RUNDIR/$IFACE.ctl" + MGMTFILE="$RUNDIR/$IFACE.mgmt" + + if [ "$METHOD" = "manual" ]; then + TAPOPTS="" + else + TAPOPTS="-t $IFACE" + fi + + # block to make sure the interface exists, see #568363 + vde_tunctl -b -t $IFACE 1>/dev/null + + start-stop-daemon --start --quiet --pidfile $PIDFILE \ + --exec $VDE_SWITCH -- \ + -s $CTLDIR -m 660 -g $GROUP -p $PIDFILE $TAPOPTS \ + -M $MGMTFILE --mgmtmode 660 -d "$@" +fi + +# vde2-plug +if [ -n "$IF_VDE2_PLUG" ]; then + set -- $IF_VDE2_PLUG + PIDFILE="$RUNDIR/$IFACE-plug.pid" + CTLDIR="$RUNDIR/$IFACE.ctl" + + start-stop-daemon --start --quiet --pidfile $PIDFILE \ + --make-pidfile --background \ + --exec $DPIPE -- $VDE_PLUG -g $GROUP -m 660 $CTLDIR = "$@" +fi + +# vde2-slirp [-|] +if [ -n "$IF_VDE2_SLIRP" ]; then + set -- $IF_VDE2_SLIRP + test "$1" = "-" && shift + PIDFILE="$RUNDIR/$IFACE-slirp.pid" + CTLDIR="$RUNDIR/$IFACE.ctl" + + start-stop-daemon --start --quiet --pidfile $PIDFILE \ + --chuid $USER \ + --exec $SLIRPVDE -- \ + -s $CTLDIR -m 660 -p $PIDFILE -d "$@" +fi diff --git a/passwd b/passwd index a639173..b590ec6 100644 --- a/passwd +++ b/passwd @@ -59,3 +59,4 @@ libvirt-dnsmasq:x:127:137:Libvirt Dnsmasq,,,:/var/lib/libvirt/dnsmasq:/usr/sbin/ mysql:x:128:138:MySQL Server,,,:/nonexistent:/bin/false statd:x:129:65534::/var/lib/nfs:/usr/sbin/nologin ulog:x:130:144::/var/log/ulog:/bin/false +vde2-net:x:131:145::/var/run/vde2:/usr/sbin/nologin diff --git a/passwd- b/passwd- index a639173..b590ec6 100644 --- a/passwd- +++ b/passwd- @@ -59,3 +59,4 @@ libvirt-dnsmasq:x:127:137:Libvirt Dnsmasq,,,:/var/lib/libvirt/dnsmasq:/usr/sbin/ mysql:x:128:138:MySQL Server,,,:/nonexistent:/bin/false statd:x:129:65534::/var/lib/nfs:/usr/sbin/nologin ulog:x:130:144::/var/log/ulog:/bin/false +vde2-net:x:131:145::/var/run/vde2:/usr/sbin/nologin diff --git a/shadow b/shadow index c9059f9..4b30d98 100644 --- a/shadow +++ b/shadow @@ -59,3 +59,4 @@ libvirt-dnsmasq:!:18385:0:99999:7::: mysql:!:18386:0:99999:7::: statd:*:18393:0:99999:7::: ulog:*:18399:0:99999:7::: +vde2-net:*:18399:0:99999:7::: diff --git a/shadow- b/shadow- index c9059f9..4b30d98 100644 --- a/shadow- +++ b/shadow- @@ -59,3 +59,4 @@ libvirt-dnsmasq:!:18385:0:99999:7::: mysql:!:18386:0:99999:7::: statd:*:18393:0:99999:7::: ulog:*:18399:0:99999:7::: +vde2-net:*:18399:0:99999:7::: diff --git a/vde2/libvdemgmt/asyncrecv.rc b/vde2/libvdemgmt/asyncrecv.rc new file mode 100644 index 0000000..8ad6d21 --- /dev/null +++ b/vde2/libvdemgmt/asyncrecv.rc @@ -0,0 +1,12 @@ +TIMEOUT 1000 +1 IN '\n' 100 +2 IF '30' 10 +3 GOTO 100 + +10 COPY +11 SKIP 2 +12 RVATOI 8 +13 EXITRV + +100 EXIT -1 + diff --git a/vde2/libvdemgmt/closemachine.rc b/vde2/libvdemgmt/closemachine.rc new file mode 100644 index 0000000..3cffc73 --- /dev/null +++ b/vde2/libvdemgmt/closemachine.rc @@ -0,0 +1,2 @@ +1 SEND 'logout\n' +2 EXIT 0 diff --git a/vde2/libvdemgmt/openmachine.rc b/vde2/libvdemgmt/openmachine.rc new file mode 100644 index 0000000..084605e --- /dev/null +++ b/vde2/libvdemgmt/openmachine.rc @@ -0,0 +1,6 @@ +TIMEOUT 1000 +1 IN '$ ' 100 +2 COPY +3 EXIT 0 + +100 EXIT -1 diff --git a/vde2/libvdemgmt/sendcmd.rc b/vde2/libvdemgmt/sendcmd.rc new file mode 100644 index 0000000..7b037b5 --- /dev/null +++ b/vde2/libvdemgmt/sendcmd.rc @@ -0,0 +1,40 @@ +TIMEOUT 1000 +1 SEND '$*\n' +2 THROW +3 IN '\n' 100 +4 IF '30' 10 +5 IF '10' 20 +6 IF '0000 DATA END WITH \'.\'' 30 +7 GOTO 2 + +10 SKIP 5 +11 COPY +13 OUTTAG 3 +14 OUTSHIFT +15 GOTO 2 + +20 SKIP 2 +21 RVATOI +22 THROW +23 IN '$ ' 100 +24 IF '30' 40 +25 EXITRV + +30 THROW +31 IN '\n' 100 +32 IF '.\n' 35 +33 COPY +34 GOTO 30 +35 OUTTAG 1 +36 OUTSHIFT +37 GOTO 2 + +40 SKIP 5 +41 COPY +42 OUTTAG 3 +43 OUTSHIFT +44 SKIP '\n' +45 GOTO 24 + +100 EXIT -1 + diff --git a/vde2/vdecmd b/vde2/vdecmd new file mode 100644 index 0000000..c588f30 --- /dev/null +++ b/vde2/vdecmd @@ -0,0 +1,17 @@ +TIMEOUT 1000 +1 IN '$ ' 100 +3 SEND '$*\n' +5 THROW +6 IN '\n' 100 +7 IF '0000 DATA END WITH \'.\'' 10 +8 IF '10' 20 +9 GOTO 100 +10 THROW +11 IN '\n' 100 +12 IF '.\n' 5 +13 COPY +14 GOTO 10 +20 SKIP 2 +21 SEND 'logout\n' +22 EXITATOI +100 EXIT -1