536 reputation
26
bio website jmtd.net
location Newcastle upon Tyne, United Kingdom
age 31
visits member for 5 years, 2 months
seen Aug 20 at 7:42

Manager of computing support people, including sysadmin stuff (mostly UNIX). Formerly a UNIX sysadmin. Programmer by hobby. Debian developer.


Feb
6
comment How do I kill processes older than “t”?
I think this is one of the more robust solutions, especially in terms of your use of ps, but I'd fold the multiple greps into the single awk, and for safety restrict the pattern matches to particular columns (to rule out e.g. a command name matching builder, etc.)
Feb
6
comment Find (and kill) old processes
also why mtime not ctime if you're looking for the creation date of the dir? the dir could theoretically be modified if an additional child was created, which I wouldn't rule out (perhaps a newly loaded kernel module would extend sysfs in some way)
Jan
12
comment Using clonezilla - how long should it take?
Lots of non-open-source programs do not handle failure gracefully, too :-)
Jan
9
comment Odd behavior of apt-get with post-inst instructions, and .desktop files
I'm glad you're sorted, cheers for the bounty :-)
Jan
8
awarded  Yearling
Jan
6
comment Odd behavior of apt-get with post-inst instructions, and .desktop files
If you put the desktop file into /usr/share/applications, you don't need the postinst at all (or the equivalent prerm snippet) — please try that.
Jan
6
comment Odd behavior of apt-get with post-inst instructions, and .desktop files
Urgh. I really hope now there's a good reason for doing it this way, the kludges keep getting more horrid :-)
Jan
6
comment Odd behavior of apt-get with post-inst instructions, and .desktop files
I posted this before the latest edit (at time of writing) which supplied the postinst. That seems to suggest I've guessed correctly. Still no idea why the postinst does is that way, but please try and see whether you can rearrange things as I've described, to see if it solves your problems.
Jan
6
answered Odd behavior of apt-get with post-inst instructions, and .desktop files
Jan
6
comment Odd behavior of apt-get with post-inst instructions, and .desktop files
Would you be able to provide a copy of your postinst?
Oct
8
awarded  Yearling
Sep
6
answered How do I prevent puppet interfering with manual server changes
Jun
20
comment iptables: change policy or use catch-all rule?
It is a matter of preference. I'd prefer the latter, as it's a theoretical risk rather than an actual service-impacting issue.
Jun
2
answered Sending mail from a server without being “spam”
May
20
comment linux apache cron-job - check file first
Good answer. If the server at the other end is not behaving properly, it might return a success status code, but a bogus file. If you split the logic out into another script (as you suggest), you could perform further sanity checks: is the resulting file a sensible length (starting with 'not 0 bytes' and perhaps moving onto something more sophisticated like 'not more than N bytes different to the original'), is the new file's contents of the right format, etc.
May
20
answered How to get the mount point of flash drive by using uuid?
May
20
answered iptables: change policy or use catch-all rule?
May
9
comment How to block everything with IPTABLES?
I'd also suggest replacing the last line with iptables -A INPUT -j DROP or even iptables -A INPUT -j REJECT --reject-with icmp-host-prohibited instead of -P DROP. In practice, setting the INPUT chain default policy to "DROP" is a sure-fire way to lock yourself out of the machine if you flush the rules by accident (easy to do when experimenting and setting up your firewall -- including if you run iptables -F as suggested earlier :))
May
9
comment How to block everything with IPTABLES?
If you are on a Redhat-based machine, run service iptables save after the above steps to make the rules persistent (survive reboot etc.)
Mar
15
answered What is the best distro to host a KVM virtualization solution