Setting up Asus WL-520gU

The script that I linked to is frater's script, or am I confused??

The script is from here which is the one harley is using and this is the one we call Frater's Script!!!!
 
Guys,

I had already initiated wget -O /tmp/prep_optware http://wd.mirmana.com/prep_optware (@ 11am) & optwares were downloaded successfully thought my bit torrent was running in background (i was unware of it until i read Sumit's post & closed it) after i closed the bit torrent I expected things to speed up but to my surprise the optware download is still not complete :( it is more than one hour. I have not received any error also. Below is the screen shot. I'll wait for another 30mins but what if it doesn't complete? can i cancel and initiate the download again? will it create problem if i cancel it in the middle?

Plz guide. Thanks

Regards,
harley
 

Attachments

  • Optwares_1.jpg
    Optwares_1.jpg
    206.6 KB · Views: 177
As long as it is downloading and installing, its not a problem. What's your line speed? Mine is 2Mbps and on a good day, the optware completes in 20-25 mins. Last night it was 20-25 minutes. Before that, it took me 45 minutes to install optware. Just keep a watch on the download progress, it should not give errors like directory not available or other such errors. Nothing to do is not an error, its normal.
 
Line speed is 512kbps. Yep i have not received any error and net connectivity is stable so I'll wait & watch. It is just that its displaying Downloading http: ipkg.nslu2-Linux.org/feeds/optware/ddwrt/cross/stable/coreutils_8.4-1_mipsel.ipk for the past 90mins.

-Harley
 
Look if something goes wrong also, all you will need to do is to prepare the external drive once again and then redo the whole process. I don't know if the preparation is necessary once again but I would certainly do that if I were you.
 
Well, if you trouble downloading the script, here is it.

just copy paste the whole thing into a text editor and save it as prep_optware.sh. then you can execute the same using sh prep_optware.sh

Code:
#!/bin/sh

# Script for installing optware on a Western Digital Worldbook (White light Edition)

# Written by frater

#

export PATH=/opt/bin:/opt/sbin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin

SCRIPTVER="Tue Mar 16 08:57:52 CET 2010"

os_date="`nvram get os_date`"

os_year=`echo $os_date | awk '{print $3}'`

os_month=`echo $os_date | awk '{print $1}'`

os_day=`echo $os_date | awk '{print $2}'`

KERNEL=`/bin/uname -r`

k26=0

/bin/uname -r | grep -q "^2\.6\." && k26=1

OLD_RC=1

[ $os_year -gt 2009 ] && OLD_RC=0

[ $os_year -eq 2009 ] && [ "$os_month" == "Dec" ] && OLD_RC=0

REBOOT_CORRECT=0

[ $os_year -gt 2009 ] && REBOOT_CORRECT=1

[ $os_year -eq 2009 ] && [ "$os_month" == "Dec" ] &&  [ $day -gt 2 ] && [ $day -lt 10 ]  && REBOOT_CORRECT=1

echo -e "$0\nWritten on: ${SCRIPTVER}"

echo -e "If you're giving feedback, please post the version as well\n\n"

if ! grep -i -q "MIPS" /proc/cpuinfo ; then

  echo "This device has no MIPS processor"

  exit 1

fi

if [ ! "$USER" = root ]; then

  echo -e "You're not root, you're ${USER}..\nI will not have enough permissions to do the things I want to do.\nExiting..."

  exit 1

fi

cd /tmp

if ! /bin/mount 2>/dev/null | grep -q " on /opt " ; then

  echo -e "You need to mount /opt\nExiting..."

  exit 1

fi

echo -e "\n\nThis will take a while!\nIf you need to do some shopping....   do it now!  ;-)\n"

sleep 1

mkdir -p /opt/etc/init.d 2>/dev/null

if [ ! -d /opt/etc/init.d ] ; then

  echo -e "I'm unable to create the directory /opt/etc/init.d  Check your config"

  exit 1

fi

ipkg-opt print_installation_architecture >/dev/null 2>&1

if [ ${?} -eq 0 ]  ; then

  echo -e "You already installed optware, good show!\nI will execute an update"

  ipkg-opt update

else

  echo -e "Optware is not installed... Let's install it\n"

  wget [url]http://wd.mirmana.com/optware-install-ddwrt.sh[/url]  -O - | tr -d '\r' > /tmp/optware-install.sh

  # wget [url]http://www.3iii.dk/linux/optware/optware-install-ddwrt.sh[/url]  -O - | tr -d '\r' > /tmp/optware-install.sh

  # wget [url]http://www.wlan-sat.com/boleo/optware/optware-install-ddwrt.sh[/url]  -O - | tr -d '\r' > /tmp/optware-install.sh

  sh /tmp/optware-install.sh

  ipkg-opt update

  if [ $? -ne 0 ] ; then

    echo "Optware installation was not successfull...  exit!"

    exit 1

  fi

fi

rc_startup=`nvram get rc_startup`

if [ ! $? -eq 0 ] ; then

  echo "Error getting startup value...  is this really DD-WRT?"

  exit 1

fi

if [ $OLD_RC -ne 0 ] ; then

  echo -en "nvram set rc_startup=\"" >/tmp/chng_startup

  echo -n "${rc_startup}" |  sed -e 's/[$`"\]/\\&/g'  >> /tmp/chng_startup

  if ! grep -q "/init.d/optS" /tmp/chng_startup ; then

    echo -e "\nn=1\nwhile [ ! -d /opt/etc/init.d ] ; do\n  sleep 3\n  [ \\\$n -gt 30 ] && break\n  let n+=1\ndone\n/opt/etc/init.d/optS\n\"" >>/tmp/chng_startup

    chmod +x /tmp/chng_startup

    /tmp/chng_startup

    nvram commit

  fi

  rm /tmp/chng_startup

  rc_shutdown=`nvram get rc_shutdown`

  if ! nvram get rc_shutdown | grep -q "/init.d/optK" ; then

    echo -en "nvram set rc_shutdown=\"" >/tmp/chng_shutdown

    echo -e "/opt/etc/init.d/optK\n" >>/tmp/chng_shutdown

    echo -n "${rc_shutdown}" | sed -e 's/[$`"\]/\\&/g'  >>/tmp/chng_shutdown

    echo -en "\""  >>/tmp/chng_shutdown

    chmod +x /tmp/chng_shutdown

    /tmp/chng_shutdown

    rm /tmp/chng_shutdown

    nvram commit

  fi

fi

mkdir -p /opt/etc/init.d 2>/dev/null

mkdir -p /opt/usr/sbin 2>/dev/null

if [ ! -d /opt/etc/init.d ] ; then

  echo "I was unable to create the directory /opt/etc/init.d, check if it is writable"

  exit 1

fi

mkdir -p /opt/var/backups

mkdir -p /opt/tmp

cd /opt/etc/init.d

isVIRGIN=1

[ -f /opt/etc/init.d/S35automount ] && isVIRGIN=0

S45DISABLED=1

[ -f /opt/etc/init.d/S45pixelserv ] && grep -q "DISABLED=0" /opt/etc/init.d/S45pixelserv && S45DISABLED=0

secIP=

terIP=

if [ -f /opt/etc/init.d/S80vlighttpd ] ; then

  secIP=`grep "^secIP=[0-9]" /opt/etc/init.d/S80vlighttpd | awk -F= '{print $2}'`

  terIP=`grep "^terIP=[0-9]" /opt/etc/init.d/S80vlighttpd | awk -F= '{print $2}'`

fi

wget -qO optK             [url]http://wd.mirmana.com/optK[/url]

wget -qO optS             [url]http://wd.mirmana.com/optS[/url]

wget -qO S00optware       [url]http://wd.mirmana.com/S00optware[/url]

# wget -qO S01modutils      [url]http://wd.mirmana.com/S01modutils[/url]

wget -qO S01bashAsShell   [url]http://wd.mirmana.com/S01bashAsShell[/url]

wget -qO S05chngProfile   [url]http://wd.mirmana.com/S05chngProfile[/url]

wget -qO S10swap          [url]http://wd.mirmana.com/S10swap[/url]

wget -qO S20wwwdata       [url]http://wd.mirmana.com/S20wwwdata[/url]

[ $k26 == 0 ] && wget -qO S30usbmount      [url]http://wd.mirmana.com/S30usbmount[/url]

wget -qO S35automount     [url]http://wd.mirmana.com/S35automount[/url]

wget -qO S95watchprinter  [url]http://wd.mirmana.com/S95watchprinter[/url]

wget -qO S95optremount    [url]http://wd.mirmana.com/S95optremount[/url]

wget -qO K99optware       [url]http://wd.mirmana.com/K99optware[/url]

if [ $REBOOT_CORRECT -ne 0 ] ; then

  wget -qO S08reboot          [url]http://wd.mirmana.com/S08reboot[/url]

fi

# kill the temporary fix for reboot if DD-WRT supports it natively

if grep -q "opt/etc" /etc/profile ; then

  rm -f /opt/etc/init.d/S08reboot 2>/dev/null

fi

if [ $isVIRGIN = 1 ] ; then

  wget -qO S60transmission_init  [url]http://wd.mirmana.com/S60transmission_init[/url]

  chmod +x K* 2>/dev/null

  chmod +x S*

fi

chmod +x optS

chmod +x optK

# Disable usbmount in k26

[ $k26 == 0 ] || chmod -x S30usbmount 2>/dev/null

wget -qO S80pound              [url]http://wd.mirmana.com/S80pound[/url]

wget -qO S45pixelserv          [url]http://wd.mirmana.com/S45pixelserv[/url]

wget -qO S80vlighttpd          [url]http://wd.mirmana.com/S80vlighttpd[/url]

wget -qO S90asterisk           [url]http://wd.mirmana.com/S90asterisk[/url]

wget -qO S90transmission       [url]http://wd.mirmana.com/S90transmission_as_user[/url]

wget -qO S90nzbget             [url]http://wd.mirmana.com/S90nzbget[/url]

if [ $OLD_RC -eq 0 ] ; then

  wget -qO S95asiablock          [url]http://wd.mirmana.com/S95asiablock[/url]

else

  wget -qO S95asiablock          [url]http://wd.mirmana.com/S95asiablock_old[/url]

fi

[ ${S45DISABLED} = 0 ] && sed -i -e "s/^DISABLED=1/DISABLED=0/" /opt/etc/init.d/S45pixelserv

if [ ! -z "${secIP}" ] ; then

  /opt/bin/sed -i -e "s/^secIP=$/secIP=${secIP}/" /opt/etc/init.d/S80vlighttpd

  /opt/bin/sed -i -e "s/^terIP=$/terIP=${terIP}/" /opt/etc/init.d/S80vlighttpd

fi

sed -i -e 's/^prefix=\/usr/prefix=\/opt/' /opt/etc/init.d/S90asterisk

mkdir -p /opt/etc/asterisk

wget -qO /opt/etc/asterisk/asterisk.sh  [url]http://wd.mirmana.com/asterisk.sh[/url]

chmod +x /opt/etc/asterisk/asterisk.sh

# Remove all symbolic links

rm K90swap 2>/dev/null

rm K70usbmount 2>/dev/null

rm K65automount 2>/dev/null

rm K20samba 2>/dev/null

rm K20pound 2>/dev/null

rm K10asterisk 2>/dev/null

rm K10transmission 2>/dev/null

rm K10nzbget 2>/dev/null

rm K05asiablock 2>/dev/null

ln -s S10swap         K90swap 2>/dev/null

ln -s S30usbmount     K70usbmount 2>/dev/null

ln -s S35automount    K65automount 2>/dev/null

ln -s S80samba        K20samba 2>/dev/null

ln -s S80vlighttpd    K20vlighttpd 2>/dev/null

ln -s S80lighttpd     K20lighttpd 2>/dev/null

ln -s S80pound        K20pound 2>/dev/null

ln -s S90asterisk     K10asterisk 2>/dev/null

ln -s S90transmission K10transmission 2>/dev/null

ln -s S90nzbget       K10nzbget 2>/dev/null

# ln -s S95asiablock    K05asiablock

# The services

ipkg-opt install xinetd

ipkg-opt install samba2

[ $? -eq 0 ] && chmod -x /opt/etc/init.d/S10xinetd

wget -qO /opt/etc/init.d/S80samba         [url]http://wd.mirmana.com/S80samba[/url]

wget -qO /opt/etc/init.d/S10xinetd        [url]http://wd.mirmana.com/S10xinetd[/url]

# widen subnet of swat

sed -i -e 's/192.168.1.0\/24/192.168.0.0\/16/' /opt/etc/xinetd.d/swat

wget -qO /opt/etc/xinetd.d/p910nd        [url]http://wd.mirmana.com/xinetd_p910nd[/url]

#Only install busybox if it never been installed before

# as it will replace the proper gnu tools

# I only want it for its httpd I'm using for the asterisk interface

[ -e /opt/bin/busybox ] || ipkg-opt install busybox

ipkg-opt -force-reinstall -force-overwrite install util-linux-ng

ipkg-opt -force-reinstall -force-overwrite install inetutils

ipkg-opt install libidn

ipkg-opt install coreutils

ipkg-opt install diffutils

ipkg-opt install findutils

if [ $k26 = 1 ] ; then

  ipkg-opt remove modutils 2>/dev/null

else

  ipkg-opt install modutils

fi

ipkg-opt install psutils

ipkg-opt install psmisc

ipkg-opt install transmission

ipkg-opt install pound

ipkg-opt install asterisk14

ipkg-opt install bind

ipkg-opt install lighttpd

ipkg-opt install openldap-libs  # needed for mod_auth

ipkg-opt install sqlite         # needed for mod_webdav

ipkg-opt install zip

ipkg-opt install php-fcgi

ipkg-opt install libjpeg

ipkg-opt install libxslt

ipkg-opt install libxml2

ipkg-opt install nzbget

# Add NAME=named to the config, so it can be used by the script 'service'

if [ -f /opt/etc/init.d/S09named ] ; then

  fdate="`date -r /opt/etc/init.d/S09named`"

  if ! grep -q "^NAME=" /opt/etc/init.d/S09named ; then

    sed -i -e 's/\/bin\/sh/\/bin\/sh\nNAME=named/' /opt/etc/init.d/S09named

    touch -d "$fdate" /opt/etc/init.d/S09named

  fi

  chmod -x /opt/etc/init.d/S09named

fi

[ -f /opt/etc/init.d/S08samba ] && chmod -x /opt/etc/init.d/S08samba

if [ $isVIRGIN = 1 ] ; then

  chmod +x /opt/etc/init.d/S80samba

  [ -f /opt/etc/samba/smb.conf ] && cp -p /opt/etc/samba/smb.conf /opt/etc/samba/smb.conf.`date +%y-%b.%d...%H.%M -r /opt/etc/samba/smb.conf`

  wget -O /opt/etc/samba/smb.conf [url]http://wd.mirmana.com/smb.conf[/url]

fi

# pixelserv

# wget -qO /opt/etc/init.d/S95pixelserv    [url]http://wd.mirmana.com/S95pixelserv[/url]

wget -qO /opt/usr/sbin/pixelserv         [url]http://wd.mirmana.com/pixelserv[/url]

chmod +x /opt/usr/sbin/pixelserv

wget -qO /opt/usr/sbin/pixelserv.pl      [url]http://wd.mirmana.com/pixelserv.pl[/url]

chmod +x /opt/usr/sbin/pixelserv.pl

if [ $isVIRGIN = 1 ] ; then

  mkdir -p /opt/etc/pixelserv

  wget -qO /opt/etc/pixelserv/hosts.include [url]http://wd.mirmana.com/hosts.include[/url]

fi

cd /opt/usr/sbin

# backupessential

wget -q [url]http://wd.mirmana.com/backupessential[/url]

wget -q [url]http://wd.mirmana.com/vars_to_include[/url]

wget -q [url]http://wd.mirmana.com/vars_to_skip[/url]

wget -q [url]http://wd.mirmana.com/vars_preferred[/url]

chmod +x /opt/usr/sbin/backupessential

#

# handy program

wget -qO /opt/sbin/aggregate           [url]http://wd.mirmana.com/aggregate[/url]

# Some handy scripts

wget -qO /opt/usr/sbin/watchprinter    [url]http://wd.mirmana.com/watchprinter[/url]

wget -qO /opt/usr/sbin/optlog          [url]http://wd.mirmana.com/optlog[/url]

wget -qO /opt/usr/sbin/service         [url]http://wd.mirmana.com/service[/url]

# modify the header of these 2 perl-scripts

wget -qO /opt/usr/sbin/imdb            [url]http://wd.mirmana.com/imdb[/url]

wget -qO /opt/usr/sbin/sendEmail       [url]http://wd.mirmana.com/sendEmail[/url]

sed -i -e 's/\/usr\/bin\/perl/\/opt\/bin\/perl/' /opt/usr/sbin/imdb

sed -i -e 's/\/usr\/bin\/perl/\/opt\/bin\/perl/' /opt/usr/sbin/sendEmail

chmod +x /opt/sbin/aggregate

chmod +x /opt/usr/sbin/watchprinter

chmod +x /opt/usr/sbin/optlog

chmod +x /opt/usr/sbin/service

chmod +x /opt/usr/sbin/imdb

chmod +x /opt/usr/sbin/sendEmail

chmod -x /opt/etc/init.d/S80lighttpd

if [ -e /dev/usb ] ; then

  wget -O /opt/etc/init.d/S95watchprinter [url]http://wd.mirmana.com/S95watchprinter[/url]

  ipkg-opt install usbutils

  ipkg-opt install p910nd

  # Disable the p910nd script....

  nvram get usb_printer | grep -q 0 || chmod +x /opt/etc/init.d/S95watchprinter 2>/dev/null

else

  chmod -x /opt/etc/init.d/S95watchprinter 2>/dev/null

fi

chmod -x /opt/etc/init.d/S30usbmount 2>/dev/null

chmod -x S95p910nd 2>/dev/null

# Supporting scripts for transmission

wget -qO /opt/usr/sbin/mkdvd          [url]http://wd.mirmana.com/mkdvd[/url]

wget -qO /opt/usr/sbin/mvmovie        [url]http://wd.mirmana.com/mvmovie[/url]

wget -qO /opt/usr/sbin/trans_watchdog [url]http://wd.mirmana.com/trans_watchdog[/url]

sed -i -e "s/^# *BASEDIR=\/mnt/BASEDIR=\/mnt/"   /opt/usr/sbin/mkdvd

sed -i -e "s/^#\!\/bin\/sh/#\!\/opt\/bin\/bash/" /opt/usr/sbin/mkdvd

sed -i -e "s/^# *BASEDIR=\/mnt/BASEDIR=\/mnt/"   /opt/usr/sbin/mvmovie

sed -i -e "s/^#\!\/bin\/sh/#\!\/opt\/bin\/bash/" /opt/usr/sbin/mvmovie

sed -i -e "s/^#\!\/bin\/sh/#\!\/opt\/bin\/bash/" /opt/usr/sbin/trans_watchdog

chmod +x /opt/usr/sbin/mkdvd

chmod +x /opt/usr/sbin/mvmovie

chmod +x /opt/usr/sbin/trans_watchdog

echo -e "\nInstalling optware packages... (will take a while)\n"

# You really should have these packages

ipkg-opt install lsof

ipkg-opt install libcurl

ipkg-opt install sudo

ipkg-opt install bash

ipkg-opt install vim

ipkg-opt -force-reinstall -force-overwrite install net-tools

ipkg-opt install grep

ipkg-opt install procps

ipkg-opt install sed

ipkg-opt install wget

ipkg-opt install unzip

ipkg-opt install unrar

ipkg-opt install gawk

ipkg-opt install tar

ipkg-opt install gzip

ipkg-opt install bzip2

ipkg-opt install openssl

ipkg-opt install calc

ipkg-opt install par2cmdline

mkdir -p /opt/share/oversight

/opt/bin/wget -O /opt/share/oversight/oversight.tgz [url]http://wd.mirmana.com/oversight.tgz[/url]

/opt/bin/tar xvzf /opt/share/oversight/oversight.tgz -C /opt

if [ ! -e /opt/etc/nzbget.conf ] ; then

  mkdir -p /mnt/usenet 2>/dev/null

  cp -p /opt/oversight/conf/unpak.cfg.example /opt/oversight/conf/unpak.cfg

  cp /opt/share/doc/nzbget/nzbget.conf.example /opt/etc/nzbget.conf

  sed -i -e 's/\$MAINDIR=.*/\$MAINDIR=\/mnt\/usenet/' /opt/etc/nzbget.conf

  sed -i -e 's/ServerIp=.*/ServerIp=0.0.0.0/' /opt/etc/nzbget.conf

  sed -i -e 's/ParPauseQueue=.*/ParPauseQueue=yes/' /opt/etc/nzbget.conf

  sed -i -e 's/PostPauseQueue=.*/PostPauseQueue=yes/' /opt/etc/nzbget.conf

  sed -i -e 's/AllowReProcess=.*/AllowReProcess=yes/' /opt/etc/nzbget.conf

  sed -i -e 's/PostProcess=.*/PostProcess=\/opt\/oversight\/unpak.sh/' /opt/etc/nzbget.conf

fi

# This one's for the utility 'host'

if [ $isVIRGIN = 1 ] ; then

  ipkg-opt install bind

  chmod -x /opt/etc/init.d/S09named

fi

# These are nice to have, too

ipkg-opt -force-reinstall -force-overwrite install e2fsprogs

ipkg-opt install htop

ipkg-opt install ncdu

ipkg-opt -force-reinstall install less

ipkg-opt install whois

ipkg-opt install tcpdump

ipkg-opt install netcat

ipkg-opt install cdrtools

ipkg-opt install mc

ipkg-opt install httping

ipkg-opt install m4

ipkg-opt install make

ipkg-opt install vsftpd

grep -q "^secure_chroot_dir" /opt/etc/vsftpd.conf || echo 'secure_chroot_dir=/opt/usr/share/empty' >>/opt/etc/vsftpd.conf

mkdir -p /opt/share/empty

xinfile=/opt/etc/xinetd.d/vsftpd

if [ ! -e $xinfile ] ; then

  mkdir -p /opt/etc/xinetd.d

  echo -e "service ftp\n{" >$xinfile

  echo -e "\tsocket_type\t= stream" >>$xinfile

  echo -e "\twait\t\t= no" >>$xinfile

  echo -e "\tuser\t\t= root" >>$xinfile

  echo -e "#\tonly_from\t= 192.168.0.0/16" >>$xinfile

  echo -e "\tserver\t\t= /opt/sbin/vsftpd" >>$xinfile

  echo -e "\tdisable\t\t= Yes" >>$xinfile

  echo -e "}" >>$xinfile

fi

#if [ ! -e /opt/local/twonkymedia/twonkymedia.sh ] ; then

twonkver=5.0.68

support=unsupported

twonkver=5.1.2

support=downloads

if [ -f /opt/local/twonkymedia/twonky.${twonkver}.zip ] ; then

  echo "Twonky already installed"

else

  echo "Install Twonky version: $twonkver"

  mkdir -p /opt/local/twonkymedia 2>/dev/null

  if  [ -e /opt/local/twonkymedia ] ; then

    wget -q -O /opt/local/twonkymedia/twonky.${twonkver}.zip http://www.twonkyforum.com/${support}/${twonkver}/twonkymedia-mipsel-uclibc-0.9.28-${twonkver}.zip

    cd /opt/local/twonkymedia

    if [ -f twonky.${twonkver}.zip ] ; then

      unzip -o twonky.${twonkver}.zip

      # chmod +x twonkymedia.sh

      wget -O /opt/etc/init.d/S95twonky [url]http://wd.mirmana.com/S95twonky[/url]

      ln -s S95twonky /opt/etc/init.d/K05twonky

      chmod +x /opt/etc/init.d/S95twonky

    fi

  else

    echo "Unable to create /opt/local/twonkymedia"

  fi

fi

optsize=`df | grep opt | grep -o "[0-9]*%" | tr -cd 0-9`

if [ -z "${optsize}" ] ; then

  echo "I could not determine the size of /opt"

else

  if [ ${optsize} -gt 85 ] && [ -z "`which perl`" ] ; then

    echo "You don't have perl, but your /opt is already bigger than 85% (${optsize}%)"

    echo "I will not install perl"

  else

    # colordiff will install perl

    ipkg-opt install ipcalc

    ipkg-opt install colordiff

    ipkg-opt install perl-libwww

  fi

fi

/opt/bin/ifconfig 2>&1 >/dev/null

if [ $? -ne 0 ] ; then

  echo "Optware's ifconfig in net-tools is broken. I will remove it so the standard utility will be used!"

  rm -f /opt/bin/ifconfig

fi

KEEPBASH=1

if [ $os_year -lt 2009 ] ; then

  KEEPBASH=0

elif echo $os_date | grep -q "2009" ; then

  echo $os_date | grep -q -e "^Oct" -e "^Nov"  -e "^Dec" || KEEPBASH=0

  if echo $os_date | grep -q -e "^Sep" ; then

    DOM=`echo $os_date | awk '{print $2}'`

    [ $DOM -lt 5 ] && KEEPBASH=0

  fi

fi

if [ $KEEPBASH -eq 0 ] ; then

  echo -e "\nI disable the shell replacement because your firmware is too old. ${os_date}\n"

  chmod -x /opt/etc/init.d/S01bashAsShell

fi

if [ $k26 == 1 ] ; then

  wget -O /opt/etc/init.d/S01fixparts [url]http://wd.mirmana.com/S01fixparts[/url]

  chmod +x /opt/etc/init.d/S01fixparts

  ipkg-opt install ntfs-3g

  ipkg-opt install ntfsprogs

  mkdir -p /opt/lib/modules/$KERNEL

  wget -O /opt/lib/modules/$KERNEL/fuse.ko ftp://ftp.dd-wrt.com/others/eko/Public/modules/$KERNEL/fuse.ko

  chmod +x /opt/lib/modules/$KERNEL/fuse.ko

fi

echo -e "\nOptware and basic packages are installed.\n"

if [ $isVIRGIN = 1 ] ; then

  echo -e "\nI installed bind to get the handy utility 'host', but I don't think you want to run your WDWB as a DNS-server"

  echo -e "\nI will delete the executable flag of /opt/etc/init.d/S09named.\n"

  echo -e "\nJust make it executable again if you DO need it.\n"

  chmod -x /opt/etc/init.d/S09named

fi

echo -e "Script finished!!\nYou can now fully use optware if you login again...\nI advice a reboot!\n"

echo -e "Do check if /opt will be mounted otherwise optware will not loaded!
 
Just got my 520 GU from prime. It's making a high pitched buzzing noise as soon as its powered up. Anyone else experiencing something like this?
 
no it shouldnt be making any noise... get it checked/changed !

@gaurish
can you please help edit this script to work with tomato f/w. this checks if you running dd-wrt and then doesnt install much. i remember having this problem with 520gu and tomato teddy bear mod. but later with ddwrt, all was well !
 
Hi guys,

Finally, I managed to successfully install Optwares on HDD connected to Asus WL-520GU (installation took 90mins, PHEW!) . After installation i started Transmission with the following command:
/opt/usr/sbin/service transmission-daemon on
/opt/usr/sbin/service transmission-daemon start


After this i tried to get web access to the Transmission page by going to http://192.168.1.2:9091 but i get an error stating:

403: Forbidden
Unauthorized IP Address.

Either disable the IP address whitelist or add your address to it.

If you're editing settings.json, see the 'rpc-whitelist' and 'rpc-whitelist-enabled' entries.

If you're still using ACLs, use a whitelist instead. See the transmission-daemon manpage for details.


Any idea how to fix this? I want to access Tranmission using web interface.

Thanks & Regards,
harley

Guys,

All problems solved and everything seems to be working fine. One last doubt.....what is the procedure to turn off the HDD and router? Should i stop all services running and then switch off the HDD (i have an off button on my HDD case) and then turn off the router or VICE VERSA?

I don't want to simply unplug the power to the router. Is there any easy way to make sure the hard drive is safe to unplug?

Thanks for your help.

-harley
 
@Harley,

congratulations. glad you discovered that all setting changes need to made to transmission config file settings.json while the transmission daemon is turned off. good source for all transmission related queries is Transmission

which f/w have you flashed to the router? it would be nice if you could post a step by step here since you just did it for the benefit of many to follow.

during shutdown, it might be best to first power down the router first and then the hard drive. i have never felt the need to shut it down though, but during absolute power failures, when the ups died too, i have never noticed any problems or loss of data on the hdd due to the devices turning off. transmission resumes the d/l without problem but just takes a while and cpu power of the router to recheck hash.
 
dheerajjotwani said:
@Harley,

congratulations. glad you discovered that all setting changes need to made to transmission config file settings.json while the transmission daemon is turned off. good source for all transmission related queries is Transmission

Thanks but i have not made any changes to settings.json All i did was changed the command from /opt/usr/sbin/service transmission-daemon on & start to service transmission on & start After this i was able to access web GUI and i even downloaded data close to 2gb.

which f/w have you flashed to the router? it would be nice if you could post a step by step here since you just did it for the benefit of many to follow.

Firmware is DD-WRT v24-sp2 (10/10/09) mini-usb-ftp. Yep i'll post a step by step procedure but before that let me run few tests to make sure what is did was correct :P
during shutdown, it might be best to first power down the router first and then the hard drive. i have never felt the need to shut it down though, but during absolute power failures, when the ups died too, i have never noticed any problems or loss of data on the hdd due to the devices turning off. transmission resumes the d/l without problem but just takes a while and cpu power of the router to recheck hash.

Okay. I am doing the same now, turning off the router than the HDD. But yesterday something went wrong....i had kept one 7gb HD movie for download but the speed was very slow may be due to only 2 seeders so i added one more 4gb movie for download and after some time i restarted the router.....transmission started rechecking/verifying the date and got stuck. After this i was not able to access transmission web gui and in telnet also it showed transmission service is not running and on trying to start transmission i got an error. Snapshot of error is attached for your reference. Can you tell me what went wrong? did i add too much load on router/hdd? and what is the solution to this problem?
 

Attachments

  • DDWRT error.jpg
    DDWRT error.jpg
    250.9 KB · Views: 179
please post how transmission is working for you? whats the number of simultaneous d/ls are you doing. please post a snapshot of command
Code:
htop
to see how the cpu and memory is fairing on the router
 
please post how transmission is working for you?
At the moment transmission is not working for me. I have used transmission for just two days & everything was fine till third day.... i have only downloaded two torrents, first one was of 57mb and another was around 2 gb. As i said in my earlier post i get an error after i try to start transmission service.

whats the number of simultaneous d/ls are you doing.
On the third day i tried 2 downloads simultaneously....first was torrent size to 8gb and another was 4gb.

please post a snapshot of command

snapshot attached.

Do you think i'll have to install transmission again?

Thanks & Regards,
harley
 

Attachments

  • DDWRT error3.jpg
    DDWRT error3.jpg
    113.9 KB · Views: 191
1. first of all i hope ur hdd is ext3 formatted.

2. remove the watchdog script from the cron.15min fold found in /etc . you can use inbuilt midnight commander.

3. also look through the cron folders for a script named movemedia. delete it too.

i will look for the command to start transmission as the router is restarted. it seems after hanging and rebooting the router the service is turning off... will get back once i get the right command for this...
 
1. first of all i hope ur hdd is ext3 formatted.
Yes it is ext3
2. remove the watchdog script from the cron.15min fold found in /etc . you can use inbuilt midnight commander.
what is the command to remove it?

3. also look through the cron folders for a script named movemedia. delete it too.

How do i delete it? Sorry....but I am a noob with linux commands :(
i will look for the command to start transmission as the router is restarted. it seems after hanging and rebooting the router the service is turning off... will get back once i get the right command for this...

Thanks a ton mate.

-harley
 
harley02 said:
Yes it is ext3
great
what is the command to remove it?
well you can just use
Code:
mc
. i wonder is there is midnight commander installed on it. try it. or else you would have to use winscp. else you would have to go thru the directory structure and reach the directory in
Code:
cd /etc
ls
will display the cron folders. cd into them and find the watchdog script. then,
Code:
rm watchdog
 
Back
Top