OpenWrt Forum Archive

Topic: whiterussian 0.9 custom-user-startup

The content of this topic has been archived on 15 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

i want the following commands to run when the router boots

/usr/sbin/setserial /dev/tts/1 irq 3
/usr/sbin/stty -F /dev/tts/1 raw speed 9600
/bin/carserver &


so i made a custom-user-startup file as follows

#!/bin/sh /etc/rc.common
START=90
# place your own startup commands here
#
# REMEMBER: You *MUST* place an '&' after launching programs you
#   that are to continue running in the background.
#
#   i.e.
#   BAD:  upnpd
#   GOOD: upnpd &
#
# Failure to do this will result in the startup process halting
# on this file and the diagnostic light remaining on (at least
# for WRT54G(s) models).
#
/usr/sbin/setserial /dev/tts/1 irq 3
/usr/sbin/stty -F /dev/tts/1 raw speed 9600
/bin/carserver &



i saved it without a file extension, sftp'd it to the router under /etc/init.d then chmod'd it to 755

i rebooted the router, but the commands didnt run, what do i do, do i have to enable it to use the custom-user-startup file? btw i have a linksys wrt54gs v4

You need to run " /etc/init.d/yourfile enable"  to male it install the appropraite symlink to /etc/rc.d (this functionality is provided by rc.common).
See http://wiki.openwrt.org/doc/techref/initscripts

The discussion might have continued from here.