Re: [qubes-users] Problems setting /etc/hosts

2021-02-02 Thread Martin Gladdish


> On 2 Feb 2021, at 13:03, donoban  wrote:
> 
> On 2/2/21 1:55 PM, Martin Gladdish wrote:
>> 
>> 
>>> On 2 Feb 2021, at 12:48, Ludovic  wrote:
>>> 
>>> 
>>> Le 02/02/2021 à 12:45, mgla...@gmail.com a écrit :
 
 
 # several lines of comment
 
 docker --data-root /home/user/docker || true
 
 echo '1.2.3.4 my-domain.example' >> /etc/hosts
 echo '1.2.3.4 another-domain.example' >> /etc/hosts
 
 Yes, when I run the script myself with sudo ./rc.local then it works fine.
 
 Argh. I think I've found the issue. It's the command to start docker 
 that's causing the rest of the file to be ignored :(
> 
> Do you mean that it runs docker in the foreground? try:
> 'docker --data-root /home/user/docker &’
> 

Yep, that’s the “fix” that got everything working as expected.

-- 
You received this message because you are subscribed to the Google Groups 
"qubes-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to qubes-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/qubes-users/CFA23FD1-96C2-4843-BE2C-0FB78E26C75C%40gmail.com.


Re: [qubes-users] Problems setting /etc/hosts

2021-02-02 Thread donoban
On 2/2/21 1:55 PM, Martin Gladdish wrote:
> 
> 
>> On 2 Feb 2021, at 12:48, Ludovic  wrote:
>>
>>
>> Le 02/02/2021 à 12:45, mgla...@gmail.com a écrit :
>>>
>>>
>>> # several lines of comment
>>>
>>> docker --data-root /home/user/docker || true
>>>
>>> echo '1.2.3.4 my-domain.example' >> /etc/hosts
>>> echo '1.2.3.4 another-domain.example' >> /etc/hosts
>>>
>>> Yes, when I run the script myself with sudo ./rc.local then it works fine.
>>>
>>> Argh. I think I've found the issue. It's the command to start docker that's 
>>> causing the rest of the file to be ignored :(

Do you mean that it runs docker in the foreground? try:
'docker --data-root /home/user/docker &'

-- 
You received this message because you are subscribed to the Google Groups 
"qubes-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to qubes-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/qubes-users/931b2223-483f-0b55-69a5-5977391242f4%40riseup.net.


OpenPGP_signature
Description: OpenPGP digital signature


Re: [qubes-users] Problems setting /etc/hosts

2021-02-02 Thread Martin Gladdish



> On 2 Feb 2021, at 12:48, Ludovic  wrote:
> 
> 
> Le 02/02/2021 à 12:45, mgla...@gmail.com a écrit :
>> 
>> 
>> # several lines of comment
>> 
>> docker --data-root /home/user/docker || true
>> 
>> echo '1.2.3.4 my-domain.example' >> /etc/hosts
>> echo '1.2.3.4 another-domain.example' >> /etc/hosts
>> 
>> Yes, when I run the script myself with sudo ./rc.local then it works fine.
>> 
>> Argh. I think I've found the issue. It's the command to start docker that's 
>> causing the rest of the file to be ignored :(
>> 
> Hi,
> 
>   note that '--data-root' is an option of the *dockerd* command, not *docker*…
> 
> Ludovic
> 

Yes. Sorry, that was autocorrect being too aggressive. It is indeed dockerd in 
my file.

-- 
You received this message because you are subscribed to the Google Groups 
"qubes-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to qubes-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/qubes-users/6D9EA18D-5728-43B5-97A5-4BD557CF907E%40gmail.com.


Re: [qubes-users] Problems setting /etc/hosts

2021-02-02 Thread Ludovic



Le 02/02/2021 à 12:45, mgla...@gmail.com a écrit :



# several lines of comment

docker --data-root /home/user/docker || true

echo '1.2.3.4 my-domain.example' >> /etc/hosts
echo '1.2.3.4 another-domain.example' >> /etc/hosts

Yes, when I run the script myself with sudo ./rc.local then it works fine.

Argh. I think I've found the issue. It's the command to start docker 
that's causing the rest of the file to be ignored :(



Hi,

  note that '--data-root' is an option of the *dockerd* command, not 
*docker*...


Ludovic

--
You received this message because you are subscribed to the Google Groups 
"qubes-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to qubes-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/qubes-users/bb3201f3-1c40-7976-fc34-bad57c814bf3%40zyrianes.net.


Re: [qubes-users] Problems setting /etc/hosts

2021-02-02 Thread mgla...@gmail.com


On Wednesday, 20 January 2021 at 22:34:31 UTC awokd wrote:

> mgla...@gmail.com: 
> > Hi, 
> > 
> > Hopefully I'm doing something silly here. 
> > 
> > I want to add a couple of entries into my /etc/hosts file in a specific 
> VM. 
> > The instructions here are nice and 
> > clear: https://www.qubes-os.org/doc/config-files/ except... that 
> doesn't 
> > work. 
> > 
> > I've added the following to my /rw/config/rc.local : 
> > echo '127.0.0.1 example.com' >> /etc/hosts 
> > And after a VM restart my /etc/hosts is unchanged. 
>
> Might have to add "sudo" in front of that echo. Also, double-check that 
> rc.local is set as executable and in proper script format. Does it work 
> if you run it yourself from the command line? 
>
> ...


Thanks.

It's literally

 #!/bin/sh

# several lines of comment

docker --data-root /home/user/docker || true

echo '1.2.3.4 my-domain.example' >> /etc/hosts
echo '1.2.3.4 another-domain.example' >> /etc/hosts

Yes, when I run the script myself with sudo ./rc.local then it works fine.

Argh. I think I've found the issue. It's the command to start docker that's 
causing the rest of the file to be ignored :(

I had presumed it was erroring, so appending || true would get me around 
that. But didn't think that the dockerd command could be running in the 
foreground.

So, not for the first time, user error instead of an issue with the setup 
of Qubes itself!

Any ideas where I could find the output when this file is run? That may 
help me track down similar issues next time around.

Thanks for your help.

-- 
You received this message because you are subscribed to the Google Groups 
"qubes-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to qubes-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/qubes-users/8d1cd8b2-7b37-41db-bfda-4934f6ab8c71n%40googlegroups.com.


Re: [qubes-users] Problems setting /etc/hosts

2021-01-21 Thread Stuart Perkins



On Wed, 20 Jan 2021 22:34:14 +
"'awokd' via qubes-users"  wrote:

>mgla...@gmail.com:
>> Hi,
>> 
>> Hopefully I'm doing something silly here.
>> 
>> I want to add a couple of entries into my /etc/hosts file in a specific VM.
>> The instructions here are nice and
>> clear: https://www.qubes-os.org/doc/config-files/ except... that doesn't
>> work.
>> 
>> I've added the following to my /rw/config/rc.local :
>> echo '127.0.0.1 example.com' >> /etc/hosts
>> And after a VM restart my /etc/hosts is unchanged.  
>
>Might have to add "sudo" in front of that echo. Also, double-check that 
>rc.local is set as executable and in proper script format. Does it work 
>if you run it yourself from the command line?
>
>> Also, as an aside, is it odd that rc.local is owned by root, if it's
>> something that's expected to be changed per-VM?  
>
>No, because it's only the root account that belongs to the VM.
>
I setup a "hosts.ext" file in the home directory of the user on the VM and an 
/rw/config/rc.local script which cat's it to the end of /etc/hosts on boot.  
That makes entries for other machines on my home network (not Qubes) for my 
convenience (rdp/vinagre, ssh etc...)  

-- 
You received this message because you are subscribed to the Google Groups 
"qubes-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to qubes-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/qubes-users/20210121155525.5860987c%40usa.net.


Re: [qubes-users] Problems setting /etc/hosts

2021-01-20 Thread unman
On Wed, Jan 20, 2021 at 10:34:14PM +, 'awokd' via qubes-users wrote:
> mgla...@gmail.com:
> > Hi,
> > 
> > Hopefully I'm doing something silly here.
> > 
> > I want to add a couple of entries into my /etc/hosts file in a specific VM.
> > The instructions here are nice and
> > clear: https://www.qubes-os.org/doc/config-files/ except... that doesn't
> > work.
> > 
> > I've added the following to my /rw/config/rc.local :
> > echo '127.0.0.1 example.com' >> /etc/hosts
> > And after a VM restart my /etc/hosts is unchanged.
> 
> Might have to add "sudo" in front of that echo. Also, double-check that
> rc.local is set as executable and in proper script format. Does it work if
> you run it yourself from the command line?
> 
> > Also, as an aside, is it odd that rc.local is owned by root, if it's
> > something that's expected to be changed per-VM?
> 
> No, because it's only the root account that belongs to the VM.
> 

I do this with a (fairly) extensive list , and block dns.
I keep the entries in a file in /rw/config/hosts, and then in rc.local:
cat  /rw/config/hosts >> etc/hosts

Doesn't need sudo for that - and the file should be in proper format and
executable already, (but always worth checking).
Works for me.

-- 
You received this message because you are subscribed to the Google Groups 
"qubes-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to qubes-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/qubes-users/20210121011901.GA3868%40thirdeyesecurity.org.


Re: [qubes-users] Problems setting /etc/hosts

2021-01-20 Thread 'awokd' via qubes-users

mgla...@gmail.com:

Hi,

Hopefully I'm doing something silly here.

I want to add a couple of entries into my /etc/hosts file in a specific VM.
The instructions here are nice and
clear: https://www.qubes-os.org/doc/config-files/ except... that doesn't
work.

I've added the following to my /rw/config/rc.local :
echo '127.0.0.1 example.com' >> /etc/hosts
And after a VM restart my /etc/hosts is unchanged.


Might have to add "sudo" in front of that echo. Also, double-check that 
rc.local is set as executable and in proper script format. Does it work 
if you run it yourself from the command line?



Also, as an aside, is it odd that rc.local is owned by root, if it's
something that's expected to be changed per-VM?


No, because it's only the root account that belongs to the VM.

--
- don't top post
Mailing list etiquette:
- trim quoted reply to only relevant portions
- when possible, copy and paste text instead of screenshots

--
You received this message because you are subscribed to the Google Groups 
"qubes-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to qubes-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/qubes-users/4722e568-8182-17ab-4366-61a600ad914a%40danwin1210.me.