Search Debian Channel Logs

Tuesday, February 28, 2017

#debian channel featuring semitones, Shadow_7, Vlan, rjsalts, missmbob, peterS,

Vlan 2017-02-28 13:08:02
Hello, I have an interesting behavior here with my debian server. I have a script that creates a file (touch or stdout redirection, it doesnt matter) and the new file is properly created. But how is it possible that running the same script via ssh /same user), the file is not created?
Vlan 2017-02-28 13:08:23
Some echo commands are executed, so it works in part
Vlan 2017-02-28 13:08:52
I am pretty sure this is a noob question so hopefully someone can enlighten me :D
peterS 2017-02-28 13:11:30
Vlan: lots of possibilities. first see whether using 'ssh -t' makes a difference. ('ssh -t' means to do a proper login with a terminal device, whereas ssh by default doesn't bother with that stuff if just directly running a command.)
peterS 2017-02-28 13:11:56
if so, if ssh -t makes it work, that doesn't directly solve your problem but it does point toward what the problem might be
Vlan 2017-02-28 13:14:28
peterS: ssh -t didnt do it :(
peterS 2017-02-28 13:15:26
Vlan: when you say stdout redirection, make sure you aren't making the dumb mistake of: 'ssh servername echo ok > /tmp/testfile' - where the redirection is happening on the client side instead of the server side
peterS 2017-02-28 13:15:41
(obviously 'touch' would not have this problem though)
Vlan 2017-02-28 13:16:21
peterS: I understand, however I'm not running the .sh as a oneliner along with the ssh login
rjsalts 2017-02-28 13:16:25
any reason why my interface isn't getting set up? I have auto eth0 iface eth0 inet6 static ... but when the host boots it doesn't seem to add ipv6, the iface eth0 inet dhcp works though
Vlan 2017-02-28 13:16:58
peterS: I am invoking the .sh after I am logged in
Vlan 2017-02-28 13:17:04
this is weird huh?
peterS 2017-02-28 13:17:11
rjsalts: so you have two 'iface eth0' sections, one for inet and one for inet6, and only the one for inet works?
rjsalts 2017-02-28 13:17:13
I also have to do pre-up dhclient -cf /etc/dhcp/dhclient6.conf -pf /run/dhclient6.eth0.pid -6 -P eth0 for dhcppd
Vlan 2017-02-28 13:17:18
also, I can touch files from that
rjsalts 2017-02-28 13:17:30
peterS: yes, that's correct
peterS 2017-02-28 13:19:40
rjsalts: so it sounds like the 'inet dhcp' is not really working either, if you have to use pre-up in order to launch dhclient
rjsalts 2017-02-28 13:20:14
peterS: and when I do ifup eth0 after boot it brings up the ipv6 addresses, it doesn't say that the process exists or what have you
rjsalts 2017-02-28 13:20:30
peterS: the pre-up is on inet6 interface
peterS 2017-02-28 13:20:35
oh right
peterS 2017-02-28 13:21:00
wait... you have both static and dhcpv6 on the same interface?
rjsalts 2017-02-28 13:21:04
peterS: but the dhclient for dhcp-pd is not running. There is a dhclient for ipv4 addresses
rjsalts 2017-02-28 13:21:57
peterS: DHCP-PD, I'm requesting a prefix be allocated with my DUID, otherwise the subnets won't be routed to me
peterS 2017-02-28 13:22:31
rjsalts: you're requesting a prefix via dhcpv6 but you're also starting with a static base v6 address?
rjsalts 2017-02-28 13:22:35
peterS: but it's a static prefix, and I'm selecting the ip address(es) I want out of that range
rjsalts 2017-02-28 13:23:16
peterS: https://en.wikipedia.org/wiki/Prefix_delegation
peterS 2017-02-28 13:23:40
yes I know about prefix delegation. But normally if you use dhcpv6 for that you also use it to get your address
peterS 2017-02-28 13:23:52
I do remember being quite unhappy with the level of integration between ifupdown and dhcpv6, though, last time I had to try to make it work
rjsalts 2017-02-28 13:24:39
peterS: this is my provider's documentation, which is pretty much what I've followed https://documentation.online.net/en/dedicated-server/network/ipv6/prefix
peterS 2017-02-28 13:25:09
(my own current situation is also dumb: my ISP sends me RA packets with no default route in them. So I have to use a script to extract the RA source address and set _that_ as my default gateway. Fun times.)
missmbob 2017-02-28 13:25:35
oh you're using systemd. i heard, not sure if it's true, that you have to specify ipv6 first, then ipv4 when there are both
missmbob 2017-02-28 13:25:48
is that the order you have them in?
rjsalts 2017-02-28 13:26:04
missmbob: no, I have inet before inet6
rjsalts 2017-02-28 13:26:37
missmbob: default init from jessie, so it's systemd iirc
semitones 2017-02-28 13:27:08
hello -- have any of you used openmediavault to make a NAS?
peterS 2017-02-28 13:28:01
rjsalts: my suspicion is that the 'inet6 static' is skipped because something notices you already have dhclient running on that interface (for v4). Or for that matter, already dhclient for v6.
peterS 2017-02-28 13:28:20
rjsalts: if you're launching dhclient for v6 in pre-up, try doing it in post-up maybe?
peterS 2017-02-28 13:29:32
though I do see that the online.net documentation mentions to do it as pre-up ... hmmm.
peterS 2017-02-28 13:30:09
wait ... why do they say 'address IPV6ADDRESS netmask PREFIXLEN'? It's supposed to be 'address IPV6ADDRESS/PREFIXLEN'
peterS 2017-02-28 13:30:59
(this also works with ipv4, as of debian wheezy, but it's what I've always seen used for ipv6.)
peterS 2017-02-28 13:32:25
huh, interesting, 'man interfaces' does mention that 'inet6' supports are 'netmask' line, but I've never seen anyone actually use it.
rjsalts 2017-02-28 13:40:31
and it works fine after boot
rjsalts 2017-02-28 13:40:42
it's just not acting on the auto eth0 ....
peterS 2017-02-28 13:41:59
strange.
peterS 2017-02-28 13:42:09
I mean, multiple 'iface' have always worked for me.
Shadow_7 2017-02-28 13:42:45
peterS: csv with no whitespace?