Using Optware packages and startup scripts on a dd-wrt router

I am trying to run a mumble server (umurmur) on my dd-wrt router (Buffalo WZR-HP-AG300H). I highlighted one of the most recent versions of the dd-wrt community on a device (SVN Rev .: 23320), it has an Atheros CPU.

After that, I connected the USB drive to the file system using these manuals ( Guide 1 , Guide 2 ) and the created directories that are writable. Here is my run - script saved in nvram (via web gui)

EDIT: Before using it with DD-Wrt, the USB drive must be disconnected.

#!/bin/sh

sleep 5
insmod mbcache
insmod jbd
insmod ext3

mkdir '/mnt/part1'
mkdir '/mnt/part2'
mount -t ext3 -o noatime /dev/sda5 /mnt/part1   # /dev/sda5 -> partition on USB pendrive
mount -t ext3 -o noatime /dev/sda7 /mnt/part2   # /dev/sda7 -> partition on USB pendrive
swapon /dev/sda6                                # /dev/sda6 -> partition on USB pendrive

sleep 2
if [ -f /mnt/part1/optware.enable ];then 
#mount -o bind /mnt/part2 /mnt/part1/root
mount -o bind /mnt/part1        /jffs
mount -o bind /mnt/part1/etc    /etc
mount -o bind /mnt/part1/opt    /opt 
mount -o bind /mnt/part1/root   /tmp/root
else
exit
fi

if [ -d /opt/usr ]; then
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/lib:/usr/lib:/opt/lib:/opt/usr/lib:/jffs/usr/lib:/jffs/usr/local/lib
export PATH=$PATH:/bin:/sbin:/usr/bin:/usr/sbin:/jffs/bin:/opt/bin:/opt/sbin:/opt/usr/bin:/opt/usr/sbin
export IPKG_INSTROOT=/opt
else
exit
fi 

script , opkg . uumurmur , umurmur. , umurmur script, /opt/etc/init.d/, , start stop, , - .

, , .

- ? , !

+4
2

Broadcom. Atheros.

:

0

, , , - , , , -

  • mkdir -p/jffs/etc/config
  • script /jffs/etc/config, .startup
  • chmod 755/jffs/etc/config/scriptname.startup
0

Source: https://habr.com/ru/post/1529086/


All Articles