• There can't be trust in the Internet of Things

    These days, news of Samsung asking their customers not to talk about sensitive information in front of Samsung devices. While I agree that they deserve any and all kind of shaming and ridiculing, Samsung and their “do-not-buy-our-stuff” policy are not the problem, but only a symptom of the problem. I...


  • Bash builtin -e and symlinks

    Just a quick reminder that bashs builtin -e test returns false for symlinks whose destination doesn’t exist: [11:11:52][blindcoder@flora:~]$ bash --version GNU bash, version 4.3.30(1)-release (x86_64-pc-linux-gnu) Copyright (C) 2013 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software; you are free to change...


  • Shared and exclusive locks

    Here’s a few snippets to get and release shared and exclusive filesystem locks. I don’t remember where I first found these, but enjoy them anyway: stalelock_exclusive () { # Check if exclusive locks are stale, ie the process they point to no # longer exists # returns 0 if lock...


  • I hate you, OpenSSH!

    Sometimes, but just sometimes, I really, really hate OpenSSH. Consider the following code: #!/bin/bash while read hostname; do ssh -o PasswordAuthentication=no -i secret.key "${hostname}" \ "echo \$(hostname): \$(date -u)" done < listofhosts.txt The file listofhosts.txt contains - surprise - a list of hostnames, one per line. The expected output of...


  • Post-vacation re-entry

    This years’ post-vacation re-entry is really hard. After sleeping in until somewhen between 8 and 10, I gotta get up on Monday mornings at 04:30 again to travel halfway across the country to the customers site, then spend 32 hours on its premises over 4 days and travel back home,...