My_Page

Post new topic   Reply to topic    DD-WRT Forum Index -> Advanced Networking
Goto page Previous  1, 2, 3 ... 20, 21, 22 ... 24, 25, 26  Next
Author Message
crashfly
DD-WRT Guru


Joined: 24 Feb 2009
Posts: 2026
Location: Sol System > Earth > USA > Arkansas

PostPosted: Tue Sep 28, 2010 17:06    Post subject: Reply with quote
@tomma - Have you checked to make sure *all* of your 'mypage' scripts (those with *.sh extension) are executable? If that does not "fix" the problem, you might also have your 'mypage' variable not set to the correct scripts (I would know as it happened to me once).
_________________
E3000 22200M KongVPN K26
WRT600n v1.1 refirb mega 18767 BS K24 NEWD2 [not used]
WRT54G v2 16214 BS K24 [access point]

Try Dropbox for syncing files - get 2.5gb online for free by signing up.

Read! Peacock thread
*PLEASE* upgrade PAST v24SP1 or no support.
Sponsor
Luniz2k1
DD-WRT Guru


Joined: 04 Oct 2007
Posts: 1258
Location: Ohio USA

PostPosted: Tue Sep 28, 2010 17:15    Post subject: Reply with quote
tomma wrote:
Does anyone know why, on the NVRAM tab, my NVRAM variables don't show up?


They do not show up on my routers as well. The only file created in my backup folder is nvram.md5

In the libs/mypage_libweb.sh file, the following code is what makes a backup of the nvram to the backup folder:
Code:
do_backup() {
   do_cmpNVHash `nvram show|md5sum|cut -d' ' -f1`
   if [ $? -eq 1 ]; then
      nvram show|awk '/^sshd_rsa/,/^-----END/{next}{print}'|awk '/^sshd_dss/,/-----END/{next}{print}'|sort|tail -n +3|sed 's/^/nvram set /g'|sed 's/=/="/g'|sed 's/$/"/g'>$BACKUPDIR/$NVRAMFILE.js
      nvram get sshd_dss_host_key | sed 's/^-----B/nvram set sshd_dss_host_key="-----B/g'|sed 's/END DSA PRIVATE KEY-----/END DSA PRIVATE KEY-----"/g'>>$BACKUPDIR/$NVRAMFILE.js
      nvram get sshd_rsa_host_key | sed 's/^-----B/nvram set sshd_rsa_host_key="-----B/g'|sed 's/END RSA PRIVATE KEY-----/END RSA PRIVATE KEY-----"/g'>>$BACKUPDIR/$NVRAMFILE.js

      cat $BACKUPDIR/$NVRAMFILE.js|grep =|grep -v 'host_key'|grep -v '=='|sed 's/nvram set //g'|awk '{ i=1; wrap=75; len=length($0); ll=int(len/wrap); if (len>wrap+2) { { print substr($0,0,wrap) } while (i<=ll) { { print "&raquo;&raquo;" substr($0,i*wrap+1,wrap) } i=i+1; } } else { { print ($0) } } }'>$BACKUPDIR/$NVRAMFILE.txt
      chmod 600 $BACKUPDIR/$NVRAMFILE.*
      do_setNVHash;
   fi
}

The nvram.md5 is before the if/fi section, and it is created. It seems that everything in the if/fi section is skipped. I will have to look through the code to see what $? is and how it is being set.

_________________
(05/02/17) std - 31924
Linksys WRT400N
Buffalo WHR-G300N

Got OpenDNS?
Luniz2k1
DD-WRT Guru


Joined: 04 Oct 2007
Posts: 1258
Location: Ohio USA

PostPosted: Tue Sep 28, 2010 17:31    Post subject: Reply with quote
Scratch that. I found the issue. In libs/mypage_libweb.sh we have:
Code:
NVRAMFILE="$BOARD-nvram-backup-$DATE-`/sbin/softwarerevision`"

I have a WRT54G-TM, and $BOARD = linksys-wrt54g/gl/gs so it tries to create a file in the backup folder called linksys-wrt54g/gl/gs-nvram-backup-20100939-15280.js

This is not going to work because you have / in the file name. So I changed the following line:
Code:
NVRAMFILE="$BOARD-nvram-backup-$DATE-`/sbin/softwarerevision`"

and changed it to:
Code:
NVRAMFILE="nvram-backup-$DATE-`/sbin/softwarerevision`"


And now my nvram variables display and the backup files are in the backup folder.

gi-minni is going to have to come up with another way to define $BOARD that does not result in the variable having /'s in it.

A better way to go about this would be to use the router_name nvram variable in the beginning of the backup file name instead of the board variable.

So the created files would be named router_name-nvram-backup-20100939-15280.js instead.

_________________
(05/02/17) std - 31924
Linksys WRT400N
Buffalo WHR-G300N

Got OpenDNS?
Luniz2k1
DD-WRT Guru


Joined: 04 Oct 2007
Posts: 1258
Location: Ohio USA

PostPosted: Tue Sep 28, 2010 17:41    Post subject: Reply with quote
These changes in libs/mypage_libweb.sh should take care of the issue:

Code:
############
# Variables
############
ME="mypage_libweb.sh"
THIS="`basename $0`"


DATE="$(date +%Y%m%W)"
BOARD="$(nvram get DD_BOARD|tr -s ' ' '-'|awk '{print tolower($0);}')"
ROUTER_NAME="$(nvram get router_name|tr -s ' ' '-'|awk '{print tolower($0);}')"
#NVRAMFILE="$BOARD-nvram-backup-$DATE-`/sbin/softwarerevision`"
NVRAMFILE="$ROUTER_NAME-nvram-backup-$DATE-`/sbin/softwarerevision`"
LOGFILE="mypage.log"
MD5FILE="nvram.md5"


It now creates files as:
router_name-nvram-backup-20100939-15280.js
router_name-nvram-backup-20100939-15280.txt

If the person does not have the router name configured, it will just create the backup files as:
-nvram-backup-20100939-15280.js
-nvram-backup-20100939-15280.txt
Which will still work.

_________________
(05/02/17) std - 31924
Linksys WRT400N
Buffalo WHR-G300N

Got OpenDNS?
tomma
DD-WRT Novice


Joined: 21 Sep 2010
Posts: 6

PostPosted: Tue Sep 28, 2010 18:18    Post subject: Reply with quote
Cool, now I see my variables. That was it Luniz2k1, thanks
Dark_Shadow
DD-WRT Guru


Joined: 31 Aug 2009
Posts: 2448
Location: Third Rock from the Sun

PostPosted: Tue Sep 28, 2010 22:03    Post subject: Reply with quote
Not sure where gi-minni is. Been awile since they were here. made a couple of changes.

Changelog:
V0.16.1-20100928
[CHG] Menu tab titles now bold like the rest of the tabs - Dark_Shadow
[FIX] NVRAM page page fix for linksys-wrt54g/gl/gs - Luniz2k1

Origonal .16 files

_________________
Peacock Thread-FAQ -- dd-wrt Wiki

Testing Multiple Routers -- Bootloader Collection Project -- My Wiki


Last edited by Dark_Shadow on Wed Sep 29, 2010 3:29; edited 3 times in total
mojso
DD-WRT User


Joined: 09 Sep 2007
Posts: 232
Location: Macedonia

PostPosted: Tue Sep 28, 2010 22:59    Post subject: Reply with quote
Dark_Shadow wrote:
Not sure where gi-minni is. Been awile since they were here. made a couple of changes.

Changelog:
V0.16.1-20100928
[CHG] Menu tab titles now bold like the rest of the tabs - Dark_Shadow
[FIX] NVRAM page page fix for linksys-wrt54g/gl/gs - Luniz2k1

Origonal .16
files


mypage-files-v0.16.1-20100928.tar



is not changed this line for wrt54gl in libs/mypage_libweb.sh

Code:

DATE="$(date +%Y%m%W)"
BOARD="$(nvram get DD_BOARD|tr -s ' ' '-'|awk '{print tolower($0);}')"
NVRAMFILE="$BOARD-nvram-backup-$DATE-`/sbin/softwarerevision`"
LOGFILE="mypage.log"
MD5FILE="nvram.md5"



to:
Code:

############
# Variables
############
ME="mypage_libweb.sh"
THIS="`basename $0`"


DATE="$(date +%Y%m%W)"
BOARD="$(nvram get DD_BOARD|tr -s ' ' '-'|awk '{print tolower($0);}')"
ROUTER_NAME="$(nvram get router_name|tr -s ' ' '-'|awk '{print tolower($0);}')"
#NVRAMFILE="$BOARD-nvram-backup-$DATE-`/sbin/softwarerevision`"
NVRAMFILE="$ROUTER_NAME-nvram-backup-$DATE-`/sbin/softwarerevision`"
LOGFILE="mypage.log"
MD5FILE="nvram.md5"




After this change, the backup works

also shows the variables in NVRAM

_________________

wrt54gl v1.1. with DD-WRT v24-sp2 (08/12/10) std-nokaid
(SVN revision 14929) + 1GB SD Card + Optware + MyPage + lighttpd

WDS linked

wrt54gl v1.1. with DD-WRT v24-sp2 (08/12/10) std-nokaid
(SVN revision 14929)
+ 2GB SD Card + Optware + MyPage

Dark_Shadow
DD-WRT Guru


Joined: 31 Aug 2009
Posts: 2448
Location: Third Rock from the Sun

PostPosted: Wed Sep 29, 2010 3:26    Post subject: Reply with quote
Yea not quite sure what happened, the targeted files didn't have any of the changes. Checking now will reposted when i fix it.



EDIT: Previous files fixed properly

_________________
Peacock Thread-FAQ -- dd-wrt Wiki

Testing Multiple Routers -- Bootloader Collection Project -- My Wiki
mojso
DD-WRT User


Joined: 09 Sep 2007
Posts: 232
Location: Macedonia

PostPosted: Wed Sep 29, 2010 8:06    Post subject: Reply with quote
Why after watching Traffic tab, Active IP Connections jumps to 500 in just a few seconds?
_________________

wrt54gl v1.1. with DD-WRT v24-sp2 (08/12/10) std-nokaid
(SVN revision 14929) + 1GB SD Card + Optware + MyPage + lighttpd

WDS linked

wrt54gl v1.1. with DD-WRT v24-sp2 (08/12/10) std-nokaid
(SVN revision 14929)
+ 2GB SD Card + Optware + MyPage

Dark_Shadow
DD-WRT Guru


Joined: 31 Aug 2009
Posts: 2448
Location: Third Rock from the Sun

PostPosted: Wed Sep 29, 2010 8:52    Post subject: Reply with quote
mojso wrote:
Why after watching Traffic tab, Active IP Connections jumps to 500 in just a few seconds?
Dunno, if I have 2 windows open one on traffic and one on router watching the conn count mine goes up to 1500+.
_________________
Peacock Thread-FAQ -- dd-wrt Wiki

Testing Multiple Routers -- Bootloader Collection Project -- My Wiki
Jiheffe
DD-WRT Novice


Joined: 03 Feb 2009
Posts: 29
Location: Braine-l'Alleud, Belgium

PostPosted: Mon Jan 03, 2011 22:36    Post subject: This is great Reply with quote
Just wanted to thank you guys for this great addon!

Running DD-WRT v24-sp2 (08/12/10) mega - build 14929 on a WRT610N. I installed it on a share on my Synology DS-209+II NAS, and used CIFS to automount it on /tmp/smbshare. Works great!

One question: does anything get written to that share (except the backups) ? If not, I guess I can safely mount the same CIFS share on a second router (Netgear WNDR3300)?
Luniz2k1
DD-WRT Guru


Joined: 04 Oct 2007
Posts: 1258
Location: Ohio USA

PostPosted: Tue Jan 04, 2011 12:29    Post subject: Re: This is great Reply with quote
Jiheffe wrote:
Just wanted to thank you guys for this great addon!

Running DD-WRT v24-sp2 (08/12/10) mega - build 14929 on a WRT610N. I installed it on a share on my Synology DS-209+II NAS, and used CIFS to automount it on /tmp/smbshare. Works great!

One question: does anything get written to that share (except the backups) ? If not, I guess I can safely mount the same CIFS share on a second router (Netgear WNDR3300)?


I have all of my routers mounting the same shared folder off of my server.

_________________
(05/02/17) std - 31924
Linksys WRT400N
Buffalo WHR-G300N

Got OpenDNS?
icehacker
DD-WRT Novice


Joined: 16 May 2011
Posts: 45

PostPosted: Tue Aug 16, 2011 17:50    Post subject: Reply with quote
hi all,

i am running kong mod 17356M on Belkin 8301 can some one guide me on how to go about installing... there are so many files here... i dont know which one to use.


i tried installing . but get a blank page on access

edit:- got it to work. here is what i did

Code:
cd /opt/www/
wget http://www.dd-wrt.com/phpBB2/download.php?id=12416
mv download.php\?id\=12416 mypage-shots-v0.16-20100129-00520.tgz
wget http://www.dd-wrt.com/phpBB2/download.php?id=12417
mv download.php\?id\=12417 mypage-files-v0.16-20100129-00520.tgz
wget http://www.dd-wrt.com/phpBB2/download.php?id=12889
mv download.php\?id\=12889 mypage-setup-v0.13-20100113-00323.tgz
tar xf mypage-files-v0.16-20100129-00520.tgz -C /opt/www/
chmod 755 *.sh *.asp
chmod -R 755 /opt/www/*.sh /opt/www/*.asp /opt/www/libs/*.sh /opt/www/js/*.js
chmod -R 755 /opt/www/setup/*.sh /opt/www/setup/libs/*.sh /opt/www/setup/lang/*.sh
chown root.root *
rm -R /tmp/www
ln -s /opt/www /tmp/www
nvram commit
cd /opt/www/setup/
./mypage_setup.sh /tmp/www y y y y y y y y
nvram commit


Is it possible to integrate bw_monitor in my page. can some one help me out
Code:
http://www.dd-wrt.com/phpBB2/viewtopic.php?t=81432&postdays=0&postorder=asc&start=315
jumran
DD-WRT User


Joined: 31 Jul 2009
Posts: 492
Location: Toronto, ON, CA

PostPosted: Tue Aug 16, 2011 19:10    Post subject: Reply with quote
Use the My Page Script version 2 that I provided a link to yesterday as that one already has Bandwidth monitoring integrated.


icehacker wrote:
hi all,

i am running kong mod 17356M on Belkin 8301 can some one guide me on how to go about installing... there are so many files here... i dont know which one to use.


i tried installing . but get a blank page on access

edit:- got it to work. here is what i did

Code:
cd /opt/www/
wget http://www.dd-wrt.com/phpBB2/download.php?id=12416
mv download.php\?id\=12416 mypage-shots-v0.16-20100129-00520.tgz
wget http://www.dd-wrt.com/phpBB2/download.php?id=12417
mv download.php\?id\=12417 mypage-files-v0.16-20100129-00520.tgz
wget http://www.dd-wrt.com/phpBB2/download.php?id=12889
mv download.php\?id\=12889 mypage-setup-v0.13-20100113-00323.tgz
tar xf mypage-files-v0.16-20100129-00520.tgz -C /opt/www/
chmod 755 *.sh *.asp
chmod -R 755 /opt/www/*.sh /opt/www/*.asp /opt/www/libs/*.sh /opt/www/js/*.js
chmod -R 755 /opt/www/setup/*.sh /opt/www/setup/libs/*.sh /opt/www/setup/lang/*.sh
chown root.root *
rm -R /tmp/www
ln -s /opt/www /tmp/www
nvram commit
cd /opt/www/setup/
./mypage_setup.sh /tmp/www y y y y y y y y
nvram commit


Is it possible to integrate bw_monitor in my page. can some one help me out
Code:
http://www.dd-wrt.com/phpBB2/viewtopic.php?t=81432&postdays=0&postorder=asc&start=315

_________________
Asus RT-N16 [Build King Kong 18050M NEWD-2 K2.6 + Optware + My Page] Mr. Green
icehacker
DD-WRT Novice


Joined: 16 May 2011
Posts: 45

PostPosted: Tue Aug 16, 2011 23:14    Post subject: Reply with quote
hi jumram i am unable to locate your link .. atm i am using 17.2 and this is what i did. but the bwmonitor is not working

if i run manually on console bwmod works but keeps giveing op

Code:
grep: invalid option -- w


this is what i did for install

Code:
cd /opt/www/
wget http://www.dd-wrt.com/phpBB2/download.php?id=17134
mv download.php\?id\=17134 mypage_V0.17.2-20101115.tgz
tar xvzf mypage_V0.17.2-20101115.tgz -C /opt/www
chmod -R 644 /opt/www/*
chmod -R 755 /opt/www/*.sh /opt/www/*.asp /opt/www/libs/*.sh /opt/www/js/*.js /opt/www/wrt*
chmod -R 755 /opt/www/setup/*.sh /opt/www/setup/libs/*.sh /opt/www/setup/lang/*.sh
chown root.root *
cd setup
rm -rf /tmp/www
./mypage_setup.sh /opt/www
ln -s /opt/www /tmp/www


my startup script is

Code:
rm -rf /tmp/www
ln -s /opt/www /tmp/www
/opt/www/mypageup.sh /opt/www 10 512


are there any workarounds

also if i use

sh /opt/www/mypageup.sh /opt/www

i get
Code:
mypage_setup.sh: ./libs/mypage_libusr.sh: line 129: syntax error: Bad substitution


i do have a MAC-PCname.txt in /opt/www/ with the MAC,PC format

edit

also i noticed that my nvram vars were

nvram set mypage_scripts="/opt/www/mypage1.sh /opt/www/mypage2.sh /opt/www/mypage3.sh /opt/www/mypage4.sh /opt/www/mypage5.sh /opt/www/mypage6.sh /opt/www/mypage7.sh /opt/www/mypage8.sh /opt/www/mypage9.sh /opt/www/mypage10.sh /

so i set it to

mypage_scripts="/opt/www/mp1.sh /opt/www/mp2.sh /opt/www/mp3.sh /opt/www/mp4.sh /opt/www/mp5.sh /opt/www/mp6.sh /opt/www/mp7.sh /opt/www/mp8.sh /opt/www/mp9.sh /opt/www/mp10.sh /opt/www/mp11.sh /opt/www/mp12.sh /opt/www/mp13.sh /opt/www/mp14.sh"


finally tried this one still the bwmod is not working any pointers wold be nice
http://www.dd-wrt.com/phpBB2/download.php?id=16678
Goto page Previous  1, 2, 3 ... 20, 21, 22 ... 24, 25, 26  Next Display posts from previous:    Page 21 of 26
Post new topic   Reply to topic    DD-WRT Forum Index -> Advanced Networking All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum