Weblogs for endecotp
I was expecting that Wget would have an option to send a HEAD, but it doesn't seem to. Neither does Curl. httping sends a HEAD, but it doesn't follow the redirect.
Can anyone point me in the direction of a simple utility that does this, or shall I write my own?
It came back up after power-cycling with nothing suspicious in its logs.
So, which "Y2K9" bug did I get bitten by?
Firstly, I need to deal with networking. Compared to every other box I have there are two differences: it has two network interfaces (wired and wireless) and they can be connected and disconnected at any time. So I have marked neither interface as "auto" but both as "allow-hotplug" in /etc/network/interfaces. But this isn't quite sufficient, as the wired interface is always present : it's just the cable that comes and goes. After a lot of searching I found ifplugd, which waits for cable attach/detach events and does the necessary work in response; the Debian package integrates nicely with /etc/network/interfaces so that it works out-of-the-box.
Now I just need to work out how to manage having two network interfaces. I think it's right to say that the two interfaces should have different IP addresses, but that I can associate both IP addresses with the same hostname. Is that right? Ideally, I want to be able to ssh to the machine using its hostname without having to worry about which interface is up at the moment. Will the client automatically try each possible IP address in turn until it finds one that works? I doubt it! Any ideas anyone?
The other thing that I need to set up is anachron, so that the jobs that run daily (such as an over-the-net backup) only run when the network is up. I think I need to somehow couple the if-up hooks into anacron somehow. Has anyone ever done anything like that?
Thanks for any suggestions.
I could easily knock together a cron script that would use the pid files to check for daemons that have gone away, and restart them. Of course automatic restart would not always be appropriate, but I'm thinking about the best thing to do when I'm on holiday and human intervention could be weeks away! I was wondering if there is any existing utility that would do this - maybe even tied in to start_stop_daemon, for example, or the metadata at the start of the init.d files.
Any ideas anyone, before I roll my own?
The idea is that they share a single root but have their own /tmp and /var. /home is also an NFS mount.
But there are files in /var/lib/dpkg, and elsewhere in /var, that presumably need to be kept in-sync with the contents of /bin, /usr and so on. So some parts of /var need to be shared too.
So, what I need is a list of the subdirectories of /var that should be shared (like /var/lib/dpkg) and the subdirectories that should be per-machine (like /var/tmp and /var/run). Is it safer to default to "shared" or "per-machine"?
I'm particularly worried about the dpkg and apt-related stuff, since its operation is "magic" to me and getting it wrong could leave everything horribly screwed up...
Here's the editted output of "tree -L 2" in /var :
| |-- dpkg.status.0
| |-- group.bak
| |-- gshadow.bak
| |-- infodir.bak
| |-- passwd.bak
| `-- shadow.bak
| |-- apt
| |-- debconf
| |-- locate
| `-- man
| |-- apt
| |-- aptitude
| |-- dhcp3
| |-- dpkg
| |-- initramfs-tools
| |-- initscripts
| |-- logrotate
| |-- misc
| |-- urandom
| |-- usbutils
| `-- vim
| |-- crond.pid
| |-- crond.reboot
| |-- klogd.pid
| |-- motd
| |-- network
| |-- sshd
| |-- sshd.pid
| |-- syslogd.pid
| `-- utmp
| |-- cron
| `-- mail -> ../mail
Now I think that I should be able to bring up the second one using an alias, something like this:
ifconfig eth0:0 netmask <something> x.y.z.2
but I'm having trouble with the netmask setting. The netmask that I've been told applies to the two (neighbouring) addresses is 255.255.255.224. This is what the first interface is configured with. Trying to use the same netmask on the alias gives an error (below) - but I'm not sure that I should be using the same netmask for the alias anyway; one search result told me that the alias should always have the netmask 255.255.255.255. I tried that, but I still get this same error:
# ifconfig eth0:0 netmask 255.255.255.224 x.y.z.2
SIOCSIFNETMASK: Cannot assign requested address
Actually although that looks like an error, it seems that it does bring up the interface alias and it is pingable, but it gives it a netmask of 255.0.0.0, which looks very wrong.
Can anyone explain what needs to happen here, and how to achieve it?
One possible answer would be "just add another section to /etc/network/interfaces and ifup eth0:0". Maybe ifup can do all this automagically for me. But I hesitate to do that, because I don't have physical access to this machine. At the moment, if I accedentally "ifdown eth0" I can remotely power-cycle it. However, if I screw up editing /etc/network/interfaces then a power-cycle might not help. So I'm only going to touch that file when I'm really confident that I have it correct.
In fact that's an interesting thought: could /etc/network/interfaces, and other critical configuration files, be set up with known-good fallbacks, used a bit like those "screen mode changed, click here within 10 secs if you can read this." dialogs?
Now that I come to look for it, I can't find it.
If anyone knows what I'm talking about, please point me in the right direction. Thanks!