#!/bin/sh SCRIPT=/usr/local/sbin/autotest_remote_shell.py if grep -qw "autotest_never_use_this_option" /proc/cmdline; then # a more beautiful solution is desirable sed -i 's/^exit.*$//' /etc/rc.local echo "( while true ; do python ${SCRIPT} /dev/ttyS0 ; done ) &" >> \ /etc/rc.local echo "exit 0" >> /etc/rc.local fi