Re: /etc/init.d/update-hostname and Networkmanager.

2011-03-11 Thread Petter Reinholdtsen
[Klaus Knopper]
> Why not put the update-hostname script to /etc/network/ip-up.d/ ?
> It will then be called as soon as network-manager (or ifup)
> assigns an address to the client.

Could work, as long as it restarts rsyslogd as well to get it to
discover the host name.

But it should probably only happen once during boot, and not every
time a roaming profile change network.

Happy hacking,
-- 
Petter Reinholdtsen


-- 
To UNSUBSCRIBE, email to debian-edu-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20110311203510.gc2...@login1.uio.no



Re: /etc/init.d/update-hostname and Networkmanager.

2011-03-11 Thread Klaus Knopper
On Fri, Mar 11, 2011 at 05:20:47PM +0100, Andreas Schockenhoff wrote:
> Hi,
> 
> in /etc/init.d/update-hostname we try to set the hostname for the
> workstations  from DNS Server. 
> 
> This can not work because Networkmanager is not started.
> 
> First I try to move update-hostname behind start 
> /etc/rc2.d/S23network-manager but this does not solve the problem.
> 
> This hack does work. It waits until tjener(dns) can be reached and then
> update. Really ugly or?   
> 
> do_start() {
> FLAGS=""
> [ "$VERBOSE" != no ] && log_action_begin_msg "Updating hostname from
> DNS"
> while ! ping -c 1 tjener.intern ; do "$UPDATE" -q ; done &
> ES=$?
> if [ "$VERBOSE" != no ] ; then
> 
> Any better ideas?

Why not put the update-hostname script to /etc/network/ip-up.d/ ?
It will then be called as soon as network-manager (or ifup)
assigns an address to the client.

Regards
-Klaus


-- 
To UNSUBSCRIBE, email to debian-edu-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20110311193145.gw5...@knopper.net



Re: /etc/init.d/update-hostname and Networkmanager.

2011-03-11 Thread Andreas Schockenhoff
Hi,

On Fri, 2011-03-11 at 18:31 +0100, Andreas B. Mundt wrote:

> On Fri, Mar 11, 2011 at 05:20:47PM +0100, Andreas Schockenhoff wrote:
> > in /etc/init.d/update-hostname we try to set the hostname for the
> > workstations  from DNS Server. 
> > 
> > This can not work because Networkmanager is not started.
> 
> Strange, it works nicely here (latest DVD installation). The
> workstation get's the hostname entered in GOsa at tjener (don't forget
> ldap2bind after adding the machine). However, NetworkManager is doing
> the job, I could not find a trace of the init script in the logs.
A diskless workstation works fine over dhcp. May be also a solution.
A DVD install report this during booting. Once set the hostname it
remains. May be we have network differences race conditions.

> What fails here is PXE installations (installer freezes).
That bug is reported to the installer team. 

> There are still some errors reported after installation from DVD,
> however, I am not sure if they are all to be taken seriously: After
> logging in only about 3 errors remain when running

> /usr/sbin/debian-edu-test-install on the workstation/ltspserver.
> Perhaps most of the errors after first boot are related to not as
> early working network with NetworkManager as without?  
> 
> Remaining errors tjener/terminal-server:
> error: ./ldap-client: TLS search for cn=admins failed.
> => not yet investigated
May be the move of admin to super-admin? :-)
> 
> error: ./nagios: Nagios count NUMSVCUNKN is not zero but 1.
> => unclear to me, the script (iirc in sitesummary) that
> reports the error doesn't report any error when called 
> alone(?!) 

bye Andreas





-- 
To UNSUBSCRIBE, email to debian-edu-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/1299867760.31321.6.camel@i965GMx-IF



Re: /etc/init.d/update-hostname and Networkmanager.

2011-03-11 Thread Andreas B. Mundt
Hi,

On Fri, Mar 11, 2011 at 05:20:47PM +0100, Andreas Schockenhoff wrote:
> in /etc/init.d/update-hostname we try to set the hostname for the
> workstations  from DNS Server. 
> 
> This can not work because Networkmanager is not started.

Strange, it works nicely here (latest DVD installation). The
workstation get's the hostname entered in GOsa at tjener (don't forget
ldap2bind after adding the machine). However, NetworkManager is doing
the job, I could not find a trace of the init script in the logs.

What fails here is PXE installations (installer freezes).

There are still some errors reported after installation from DVD,
however, I am not sure if they are all to be taken seriously: After
logging in only about 3 errors remain when running
/usr/sbin/debian-edu-test-install on the workstation/ltspserver.
Perhaps most of the errors after first boot are related to not as
early working network with NetworkManager as without?  

Remaining errors tjener/terminal-server:
  error: ./ldap-client: TLS search for cn=admins failed.
  => not yet investigated

  error: ./nagios: Nagios count NUMSVCUNKN is not zero but 1.
  => unclear to me, the script (iirc in sitesummary) that
  reports the error doesn't report any error when called alone(?!) 

Remaining errors workstation/terminal-server:
  error: ./ldap-client: TLS search for cn=admins failed.
  error: ./ltsp: /etc/iceweasel/profile/cert_override.txt differ inside
  and outside LTSP
  error: ./webserver: Missing /etc/iceweasel/profile/cert_override.txt.
  => none of the above investigated yet

Best regards,

 Andi


-- 
To UNSUBSCRIBE, email to debian-edu-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20110311173129.GA6660@flashgordon



Re: /etc/init.d/update-hostname and Networkmanager.

2011-03-11 Thread Petter Reinholdtsen
[Andreas Schockenhoff]
> Any better ideas?

Not waiting for network-manager to do it, but instead do it in the
networking script seem like a better idea, as the hostname need to be
set when rsyslogd is started very early to make sure the correct
hostname is used when logging syslog messages.

Happy hacking,
-- 
Petter Reinholdtsen


-- 
To UNSUBSCRIBE, email to debian-edu-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20110311164328.gb2...@login1.uio.no



/etc/init.d/update-hostname and Networkmanager.

2011-03-11 Thread Andreas Schockenhoff
Hi,

in /etc/init.d/update-hostname we try to set the hostname for the
workstations  from DNS Server. 

This can not work because Networkmanager is not started.

First I try to move update-hostname behind start 
/etc/rc2.d/S23network-manager but this does not solve the problem.

This hack does work. It waits until tjener(dns) can be reached and then
update. Really ugly or?   

do_start() {
FLAGS=""
[ "$VERBOSE" != no ] && log_action_begin_msg "Updating hostname from
DNS"
while ! ping -c 1 tjener.intern ; do "$UPDATE" -q ; done &
ES=$?
if [ "$VERBOSE" != no ] ; then

Any better ideas?

regards Andreas


-- 
To UNSUBSCRIBE, email to debian-edu-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/1299860447.29893.8.camel@i965GMx-IF