/rw/config/rc.local on debian-8

123 views
Skip to first unread message

johny...@sigaint.org

unread,
Aug 22, 2016, 10:52:57 AM8/22/16
to qubes...@googlegroups.com
/rw/config/rc.local doesn't seem to be run on startup in debian-8
(3.2-testing).

What is supposed to launch this? systemd, another startup script, or
something dom0-related?

I added "/rw/config/rc.local" to "/etc/rc.local" and it works, but was
wondering what might be the official way to do this, and if this is a bug.

Thanks.

JJ

Andrew David Wong

unread,
Aug 22, 2016, 11:51:30 AM8/22/16
to johny...@sigaint.org, qubes...@googlegroups.com
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
Did you make it executable?

# chmod +x /rw/config/rc.local

- --
Andrew David Wong (Axon)
Community Manager, Qubes OS
https://www.qubes-os.org
-----BEGIN PGP SIGNATURE-----

iQIcBAEBCgAGBQJXux9LAAoJENtN07w5UDAwboIQAJp1eNO29sLOTzWSUR2Hp/1x
1HEnYZou3sIPcwWUeHJJkY7AchJJjtUvqT3MdyO2xdSBAM3X4aeHh7N9DEWMjMny
AKnjCqKJusCAP7gcgC8ovousvEvLkX5BtaJI1U9SSxSzOvnTDoSSuHph0K9TUToG
DrR3vFfZrK2e/LPkxPOOPZ/D5wOgWkQpFY9lxbZIZosBvpyt0XvHFAwTyLZNnWXk
C58SnRg8+rUEz5vsDREPRVYFq90xty/mluMlQ6GfH/aRdpupfs0ryPvnYr/PaO4s
2/8mSCFjRuEIBflJWtEpz0QMYeg+V6yWi8nFtTrn++TQtHMTeYqIg5opShX0TT74
7qy+aqtt0V7vxPYnRR6N2AIwmPx1aP8rqvv/n1uyFKnRnGS+k5/zBaWHpE8OwaqP
emorzxIyqa2qSypBWv08mtkviO+xDuME8aa9Ly+dnYGRSLQeG9zzqw3U6zfIb7D/
TijJIsOQvamu+8pkiJIjfL8Ukz83UacYvuW1+izKFBCd5VEj+RYXxgOIEbUo9eDT
7f7cVr579k/LLCnc973x0y4Dlu8vzTA9zo+NwbCtkAD4WIeyQzGQDeMIRM1sUVO8
3YCwsNzqv3UE2/SHt2cWrbmMdAO8L9fYr5pSTLXH3qpimmjWIxE4BwSUUAeo7Tto
mWgGxpY3Cun4BUjJzko5
=qAij
-----END PGP SIGNATURE-----

johny...@sigaint.org

unread,
Aug 22, 2016, 7:46:12 PM8/22/16
to Andrew David Wong, johny...@sigaint.org, qubes...@googlegroups.com
> On 2016-08-22 07:52, johny...@sigaint.org wrote:
>> /rw/config/rc.local doesn't seem to be run on startup in debian-8
>> (3.2-testing).
>>
>> What is supposed to launch this? systemd, another startup script, or
>> something dom0-related?
>>
>> I added "/rw/config/rc.local" to "/etc/rc.local" and it works, but was
>> wondering what might be the official way to do this, and if this is a
>> bug.
>>
>> Thanks.
>>
>> JJ
>>
>
> Did you make it executable?
>
> # chmod +x /rw/config/rc.local

Yes, I did.

And it seems to be working. I must have been confused at some point with
too many windows open in different VM's. :)

Apologies for the mistaken report.

JJ

Vincent Elliott

unread,
Nov 17, 2016, 9:54:09 AM11/17/16
to qubes-users, a...@qubes-os.org, johny...@sigaint.org

Just adding my 2 cents to this conversation...

The file "/rw/config/rc.local" does not consistently execute on Debian-8 and I find that the VM has to be restarted (sometimes multiple times) for it to take effect. The file is executable and all I am trying to do is allow traffic from some other VM(s) as per the instructions in https://www.qubes-os.org/doc/firewall/.

The contents of the file is below:

#!/bin/sh

# This script will be executed at every VM startup, you can place your own
# custom commands here. This include overriding some configuration in /etc,
# starting services etc.
#
# You need to make this script executable to have it enabled.

# Example for overriding the whole CUPS configuration:
# rm -rf /etc/cups
# ln -s /rw/config/cups /etc/cups
# systemctl --no-block restart cups
iptables -I INPUT -s 10.137.2.22 -j ACCEPT
iptables -I INPUT -s 10.137.2.24 -j ACCEPT
/rw/config/rc.local (END)

How can I ensure that the script executes reliably?

Vincent


dmoe...@gmail.com

unread,
Nov 17, 2016, 10:24:01 AM11/17/16
to qubes-users, a...@qubes-os.org, johny...@sigaint.org
On Thursday, November 17, 2016 at 9:54:09 AM UTC-5, Vincent Elliott wrote:
> Just adding my 2 cents to this conversation...
>
> The file "/rw/config/rc.local" does not consistently execute on Debian-8 and I find that the VM has to be restarted (sometimes multiple times) for it to take effect. The file is executable and all I am trying to do is allow traffic from some other VM(s) as per the instructions in https://www.qubes-os.org/doc/firewall/.
>
> How can I ensure that the script executes reliably?

Debian machines sometimes have a problem with loading rc.local a little too quickly. Putting "sleep 1" or "sleep 5" before loading your firewall rules
should make it reliable. (see further http://askubuntu.com/a/556563)

Daniel

Vincent Elliott

unread,
Nov 17, 2016, 3:08:40 PM11/17/16
to dmoe...@gmail.com, qubes-users, Andrew David Wong, johny...@sigaint.org
The amendment worked like a charm.

Thanks,
Vincent

Vincent "Kim" Elliott
ITC Consultant
Kingston, Jamaica



--
You received this message because you are subscribed to a topic in the Google Groups "qubes-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/qubes-users/9OEKKNtelXA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to qubes-users+unsubscribe@googlegroups.com.
To post to this group, send email to qubes...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/qubes-users/43c9b01d-9eb8-4804-aa9a-c486397a6891%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages