User: Password:
|
|
Subscribe / Log in / New account

Shuttleworth: Not convinced by rolling releases

Shuttleworth: Not convinced by rolling releases

Posted Mar 9, 2013 11:17 UTC (Sat) by k3ninho (subscriber, #50375)
In reply to: Shuttleworth: Not convinced by rolling releases by HelloWorld
Parent article: Shuttleworth: Not convinced by rolling releases

>There was once a bug in some build system which contained something like "rm -rf /$foo". It turned out that under certain circumstances, $foo could be empty. It's easy to imagine when you run something like that as root.

The solution to that bash anti-pattern is to create an if-safe-delete function that you know you can trust, and then to use it at the places you might delete /. Write the if-variable-is-empty comparison once, correctly, and record its existence it in the man pages for eternity, so everyone can side-step failures from this.

K3n.


(Log in to post comments)


Copyright © 2017, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds