remy porter remy escaped the enterprise world and now works as a consultant. editor-in-chief for tdwtf. 




in 1989, a pair of physicists claimed to have achieved the fusion of hydrogen at room temperatures. this came as quite a shock to other physicists, since fusion was only known to happen inside of stars. within a few months, their claims were roundly rejected. cold fusion became synonymous with junk science. 




fast forward to 1995. when a small company wanted to make its own set of generous claims about its web application framework. allaire, inc (eventually bought out by macromedia, which itself was eaten by adobe), claimed that its cold fusion could solve all your web development problems. all of your web development challenges could be solved through the judicious application of cfml. 




fast forward to today, where i<u+2019>m surprised to learn that coldfusion is still in active development. brian recently had the pleasure of attempting to install it. first, he was annoyed at just the install size- 1.2gb for a web runtime and its assorted libraries. then<u+2026> the install failed. brian poked around in the installer and found the following shell script: distro_name= guest_os_name= if [ -f /etc/issue ] ; then distro_name=`cat /etc/issue` fi if [ ! -z "$distro_name" ] ; then if [ ! -z "$(echo $distro_name | awk '/ubuntu/')" ] ; then jre_success=`exec "$actvm" 2>&1` case "$jre_success" in *no*such*file*or*directory*|*install*bin*|*cannot*execute*binary*file* ) echo "jre libraries are missing or not compatible...." echo "exiting...." ;; *) exec "$actvm" $options $lax_nl_java_launcher_main_class "$propfname""$envpropertiesfile" $cmdlineargs ;; esac elif [ ! -z "$(echo $distro_name | awk '/centos/')" ] ; then jre_success=`exec "$actvm" 2>&1` case "$jre_success" in *no*such*file*or*directory*|*install*bin*|*cannot*execute*binary*file* ) echo "jre libraries are missing or not compatible...." echo "exiting...." ;; *) exec "$actvm" $options $lax_nl_java_launcher_main_class "$propfname""$envpropertiesfile" $cmdlineargs ;; esac elif [ ! -z "$(echo $distro_name | awk '/suse/')" ] ; then jre_success=`exec "$actvm" 2>&1` case "$jre_success" in *no*such*file*or*directory*|*install*bin*|*cannot*execute*binary*file* ) echo "jre libraries are missing or not compatible...." echo "exiting...." ;; *) exec "$actvm" $options $lax_nl_java_launcher_main_class "$propfname""$envpropertiesfile" $cmdlineargs ;; esac 




there are a few issues here. first, while /etc/issue is a file that you can reasonably expect a modern linux system to have, there is no guarantee that it is there, or that its contents will include the identifier of the system distribution. if there isn<u+2019>t one, the installer makes no attempt to fail over to a different file (like /etc/system-release , which while also not guaranteed, is probably more accurate), or even uname . but that<u+2019>s all minor details. 




regardless of what it finds in the /etc/issue file, it executes the exact same command anyway, raising the question of why it even checked in the first place. [advertisement] incrementally adopt devops best practices with buildmaster , proget and otter , creating a robust, secure, scalable, and reliable devops toolchain.
codesod: coldly fused
remy porter