A preventative fix for bug 557177 (the "... erased all my data in /" one)
Gavin Panella
gavin.panella at canonical.com
Thu Apr 8 09:43:34 UTC 2010
I read mdz's post
<http://mdzlog.alcor.net/2010/04/08/a-story-in-numbers/> and saw the
one line fix:
- cd "${MOUNTPOINT}"
+ cd "${MOUNTPOINT:?mount point not specified}"
and wondered if there might be a better long-term preventative fix for
this: run all init scripts with "set -o errexit -o nounset" shell
options. Is this feasible? My guess is that converting all scripts to
work with these options is a pretty big task.
(From past experience as a sysadmin, putting these options at the top
of every script is a total win; I was forced to consider failure
scenarios, and even when I didn't the damage was limited. Over time it
made me write cleaner and more robust scripts.)
Gavin.
More information about the Ubuntu-devel-discuss
mailing list