In order to install and start seattle automatically when installing our OpenWrt image, we need to create an init.d script manually and call both the seattleinstaller and the usual start_seattle script from init.d.
This is an example:
#!/bin/sh /etc/rc.common
START=99
USE_PROCD=1
start_service() {
export PATH=$PATH:/opt/usr/bin:/opt/usr/sbin
export LD_LIBRARY_PATH=/opt/lib:/opt/usr/lib
PYTHONDONTWRITEBYTECODE=TRUE
export PYTHONDONTWRITEBYTECODE
sh /root/seattle/install.sh --percent 40
sh /root/seattle/start_seattle.sh
}
In order to let seattle works on OpenWrt, it'd be better to check node.cfg instead, just like start_seattle.sh( https://github.com/SeattleTestbed/dist/blob/master/linux/scripts/start_seattle.sh#L7). We can skip the procedure of testing if seattle is installed in the seattleinstaller.py and check node.cfg in the install.sh when detecting seattle is installing on OpenWrt devices.
In order to install and start seattle automatically when installing our OpenWrt image, we need to create an init.d script manually and call both the
seattleinstaller
and the usualstart_seattle
script from init.d. This is an example:However, currently seattle installer checks if seattle is installed by init.d script or crontab( https://github.com/SeattleTestbed/installer-packaging/blob/master/all-platforms/seattleinstaller.py#L1981-L2058). So although seattle is not installed, it also will show seattle has been installed because init.d script has existed on OpenWrt.
In order to let seattle works on OpenWrt, it'd be better to check
node.cfg
instead, just likestart_seattle.sh
( https://github.com/SeattleTestbed/dist/blob/master/linux/scripts/start_seattle.sh#L7). We can skip the procedure of testing if seattle is installed in theseattleinstaller.py
and checknode.cfg
in theinstall.sh
when detecting seattle is installing on OpenWrt devices.