Package Details: simple-rt 20170510.132_c270fc9-1

Git Clone URL: https://aur.archlinux.org/simple-rt.git (read-only)
Package Base: simple-rt
Description: SimpleRT - Reverse Tethering utility for Android
Upstream URL: https://github.com/vvviperrr/SimpleRT
Keywords: android network tethering
Licenses: GPLv3
Submitter: AnatolyRugalev
Maintainer: AnatolyRugalev
Last Packager: AnatolyRugalev
Votes: 2
Popularity: 0.558626
First Submitted: 2017-03-29 16:27
Last Updated: 2018-01-23 21:57

Latest Comments

rcf commented on 2018-05-26 01:27

As for an actual fix I would go with something along the lines of

diff --git a/PKGBUILD b/PKGBUILD
index e6cac9f..c3223aa 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -24,7 +24,9 @@ build() {
        cd "$srcdir/simple-rt/simple-rt-cli"
        make
        export SIMPLERT_INTERFACE=$(ip link show | grep "state UP" | awk -F ': ' '{ print $2}')
-       cat "$srcdir/simple-rt@.service" | sed -e "s/%i/$SIMPLERT_INTERFACE/g" > "$srcdir/simple-rt.service"
+       if [ `echo "$SIMPLERT_INTERFACE" | wc -l` -eq 1 ]; then 
+               cat "$srcdir/simple-rt@.service" | sed -e "s/%i/$SIMPLERT_INTERFACE/g" > "$srcdir/simple-rt.service"
+       fi
 }

 package() {
@@ -34,5 +36,7 @@ package() {
        install -m755 "$srcdir/simple-rt/simple-rt-cli/simple-rt" "$pkgdir/usr/lib/simple-rt/simple-rt"
        install -m755 "$srcdir/simple-rt/simple-rt-cli/iface_up.sh" "$pkgdir/usr/lib/simple-rt/iface_up.sh"
        install -DT -m0755 "$srcdir/simple-rt@.service" "$pkgdir/usr/lib/systemd/system/simple-rt@.service"
-       install -DT -m0755 "$srcdir/simple-rt.service" "$pkgdir/usr/lib/systemd/system/simple-rt.service"
+       if [ -e "$srcdir/simple-rt.service" ]; then 
+               install -DT -m0755 "$srcdir/simple-rt.service" "$pkgdir/usr/lib/systemd/system/simple-rt.service"
+       fi
 }

because simple-rt.service might confuse people who don't realize it's tied to one interface. Or maybe it could select the interface used by the default route, which would at least guarantee that you're getting Internet access.

rcf commented on 2018-05-25 11:43

With more than one active interface,

cat "$srcdir/simple-rt@.service" | sed -e "s/%i/$SIMPLERT_INTERFACE/g" > "$srcdir/simple-rt.service"

fails with

sed: -e expression #1, char 10: unterminateds' command`

as $SIMPLERT_INTERFACE ends up being multiple lines.

AnatolyRugalev commented on 2018-01-23 22:01

Alright, I implemented Unit template and its available now.

You can specify any desired interface via systemd instantiation:

sudo systemctl start simple-rt@enp5s0

simple-rt unit still available for BC. PKGBUILD scans active network interfaces and chooses first one for simple-rt unit

Please, let me know if something is wrong. Thank you

Also, net-tools was added to dependencies because original code requires ifconfig to be installed

raingloom commented on 2018-01-09 09:44

The service file should be parameterized over the network interface:

$ diff simple-rt@.service simple-rt.service

6c6
< ExecStart=/usr/lib/simple-rt/simple-rt -i %i
---
> ExecStart=/usr/lib/simple-rt/simple-rt -i enp5s0