Optware, the right way

Post new topic   This topic is locked: you cannot edit posts or make replies.    DD-WRT Forum Index -> Broadcom SoC based Hardware
Goto page Previous  1, 2, 3, 4 ... 157, 158, 159  Next
Author Message
frater
DD-WRT Guru


Joined: 07 Jun 2006
Posts: 2777

PostPosted: Sun Oct 18, 2009 21:51    Post subject: Reply with quote
No, you can run this seperately afterwards...
I thought it was easier just to rewrite the S10xinetd script so it supports start/stop/restart....

swat is working....

_________________
Asus RT16N + OTRW
Kingston 4GB USB-disk 128 MB swap + 1.4GB ext3 on /opt + 2 GB ext3 on /mnt
Copperjet 1616 modem in ZipB-config
Asterisk, pixelserv & Pound running on router
Another Asus RT16N as WDS-bridge

DD-WRT v24-sp2 vpn (c) 2010 NewMedia-NET GmbH
Release: 12/16/10 (SVN revision: 15758M)
Sponsor
DHC_DarkShadow
DD-WRT Guru


Joined: 22 Jun 2008
Posts: 2440
Location: Am now Dark_Shadow

PostPosted: Sun Oct 18, 2009 22:01    Post subject: Reply with quote
I still get unable to display page for 192.168.1.1:901. I thought I should post the below info, might have something to do with it.

Start Up

Code:
mount --bind /mmc/jffs /jffs
mount -o bind /jffs/opt /opt


Shutdown

Code:
umount /jffs/opt /opt
umount /mmc/jffs /jffs


Firewall

Code:
iptables -I INPUT -i br0 -s 192.168.1.0/25 -p tcp --dport 53 -j DROP
iptables -I INPUT -i br0 -s 192.168.1.0/25 -p udp --dport 53 -j DROP
iptables -t nat -I PREROUTING -p udp -i br0 -s 192.168.1.128/25 --dport 53 -j DNAT --to 208.67.222.222
iptables -t nat -I PREROUTING -p tcp -i br0 -s 192.168.1.128/25 --dport 53 -j DNAT --to 208.67.222.222
iptables -t nat -I PREROUTING -d 208.67.220.220 -j ACCEPT


Additional DNSMasq Options

Code:
dhcp-option=6,192.168.1.10,192.168.1.1
strict-order


frater wrote:
No, you can run this seperately afterwards...
I thought it was easier just to rewrite the S10xinetd script so it supports start/stop/restart....

swat is working....


So someone installing this fresh, it would be fine right?

_________________
The New Me
frater
DD-WRT Guru


Joined: 07 Jun 2006
Posts: 2777

PostPosted: Sun Oct 18, 2009 22:11    Post subject: Reply with quote
What happens if you do:
Code:
service
service xinetd
service xinetd start
netstat -anp | grep 901
netstat -an | grep 901

It's only for those downloading prep_optware today or before....

_________________
Asus RT16N + OTRW
Kingston 4GB USB-disk 128 MB swap + 1.4GB ext3 on /opt + 2 GB ext3 on /mnt
Copperjet 1616 modem in ZipB-config
Asterisk, pixelserv & Pound running on router
Another Asus RT16N as WDS-bridge

DD-WRT v24-sp2 vpn (c) 2010 NewMedia-NET GmbH
Release: 12/16/10 (SVN revision: 15758M)
DHC_DarkShadow
DD-WRT Guru


Joined: 22 Jun 2008
Posts: 2440
Location: Am now Dark_Shadow

PostPosted: Sun Oct 18, 2009 22:15    Post subject: Reply with quote
Code:
root@WRT54G-TMv11:~# service

Service:             automount (/opt/etc/init.d/S35automount)
Service:                 samba (/opt/etc/init.d/S80samba)
Service:                 pound (/opt/etc/init.d/S80pound)
Service:              asterisk (/opt/etc/init.d/S90asterisk)
Service:   transmission-daemon (/opt/etc/init.d/S90transmission)
Service:                xinetd (/opt/etc/init.d/S10xinetd) disabled
Service:                 named (/opt/etc/init.d/S09named) disabled
root@WRT54G-TMv11:~# service xinetd
Service "xinetd" is disabled (/opt/etc/init.d/S10xinetd)
root@WRT54G-TMv11:~# service xinetd start
Service "xinetd" is disabled (/opt/etc/init.d/S10xinetd)
root@WRT54G-TMv11:~# netstat -anp | grep 901
netstat: illegal option -- p
root@WRT54G-TMv11:~# netstat -an | grep 901

_________________
The New Me
frater
DD-WRT Guru


Joined: 07 Jun 2006
Posts: 2777

PostPosted: Sun Oct 18, 2009 22:19    Post subject: Reply with quote
Somehow it seems optware is not running...
I can tell by "netstat -anp" giving an error...

Is it possible you did a quick login immediately after a reboot or didn't do a reboot yet? Start a new session (telnet or ssh) and see what happens if you give "netstat -anp"

You also need to enable xinetd.

Code:
service xinetd on
service xinetd start

_________________
Asus RT16N + OTRW
Kingston 4GB USB-disk 128 MB swap + 1.4GB ext3 on /opt + 2 GB ext3 on /mnt
Copperjet 1616 modem in ZipB-config
Asterisk, pixelserv & Pound running on router
Another Asus RT16N as WDS-bridge

DD-WRT v24-sp2 vpn (c) 2010 NewMedia-NET GmbH
Release: 12/16/10 (SVN revision: 15758M)
DHC_DarkShadow
DD-WRT Guru


Joined: 22 Jun 2008
Posts: 2440
Location: Am now Dark_Shadow

PostPosted: Sun Oct 18, 2009 22:30    Post subject: Reply with quote
Same thing with new telnet session, no quick login, and rebooted as advised in script

Code:
root@WRT54G-TMv11:~# netstat -anp
netstat: illegal option -- p
root@WRT54G-TMv11:~# service xinetd on
Enable service "xinetd" (/opt/etc/init.d/S10xinetd)
root@WRT54G-TMv11:~# service xinetd start
root@WRT54G-TMv11:~#


EDIT: after a another reboot of the router

Code:
root@WRT54G-TMv11:~# netstat -anp
netstat: illegal option -- p
root@WRT54G-TMv11:~# service xinetd on
root@WRT54G-TMv11:~# service xinetd start
xinetd already running
root@WRT54G-TMv11:~#


I get a login for SWAT, um what do i out in for name and password?

I entered

root - user name
admin - password

And got

Code:
401 Bad Authorization
username or password incorrect


Now that's all i get when i goto 192.168.1.1:901

A rerun of service gives me

Code:
root@WRT54G-TMv11:~# service
Service:             automount (/opt/etc/init.d/S35automount)
Service:                 samba (/opt/etc/init.d/S80samba)
Service:                 pound (/opt/etc/init.d/S80pound)
Service:              asterisk (/opt/etc/init.d/S90asterisk)
Service:   transmission-daemon (/opt/etc/init.d/S90transmission)
Service:                xinetd (/opt/etc/init.d/S10xinetd)
Service:                 named (/opt/etc/init.d/S09named) disabled
root@WRT54G-TMv11:~#

_________________
The New Me
frater
DD-WRT Guru


Joined: 07 Jun 2006
Posts: 2777

PostPosted: Sun Oct 18, 2009 22:55    Post subject: Reply with quote
Your login credentials should be same as your router's
_________________
Asus RT16N + OTRW
Kingston 4GB USB-disk 128 MB swap + 1.4GB ext3 on /opt + 2 GB ext3 on /mnt
Copperjet 1616 modem in ZipB-config
Asterisk, pixelserv & Pound running on router
Another Asus RT16N as WDS-bridge

DD-WRT v24-sp2 vpn (c) 2010 NewMedia-NET GmbH
Release: 12/16/10 (SVN revision: 15758M)
DHC_DarkShadow
DD-WRT Guru


Joined: 22 Jun 2008
Posts: 2440
Location: Am now Dark_Shadow

PostPosted: Sun Oct 18, 2009 22:58    Post subject: Reply with quote
frater wrote:
Your login credentials should be same as your router's


ok how do i get back to were it asks me?

I got named to run. Not sure why they are not running automatically. still get the same error message when i input "netstat -anp".

Service output

Code:
root@WRT54G-TMv11:~# service
Service:             automount (/opt/etc/init.d/S35automount)
Service:                 samba (/opt/etc/init.d/S80samba)
Service:                 pound (/opt/etc/init.d/S80pound)
Service:              asterisk (/opt/etc/init.d/S90asterisk)
Service:   transmission-daemon (/opt/etc/init.d/S90transmission)
Service:                xinetd (/opt/etc/init.d/S10xinetd)
Service:                 named (/opt/etc/init.d/S09named)
root@WRT54G-TMv11:~#


ok after another reboot, to possibly reset swat

Reboot showed nothing shutting down this time.

service output

Code:
BusyBox v1.13.4 (2009-09-30 10:16:35 CEST) built-in shell (ash)
Enter 'help' for a list of built-in commands.

root@WRT54G-TMv11:~# service
Service:             automount (/opt/etc/init.d/S35automount)
Service:                 samba (/opt/etc/init.d/S80samba)
Service:                 pound (/opt/etc/init.d/S80pound)
Service:              asterisk (/opt/etc/init.d/S90asterisk)
Service:   transmission-daemon (/opt/etc/init.d/S90transmission)
Service:                xinetd (/opt/etc/init.d/S10xinetd)
Service:                 named (/opt/etc/init.d/S09named)
root@WRT54G-TMv11:~#


Get unable to display page when browsing 192.168.1.1:901

_________________
The New Me


Last edited by DHC_DarkShadow on Sun Oct 18, 2009 23:05; edited 1 time in total
frater
DD-WRT Guru


Joined: 07 Jun 2006
Posts: 2777

PostPosted: Sun Oct 18, 2009 23:05    Post subject: Reply with quote
Code:
echo $PATH
which bash
find / -name netstat
ls -altr /opt/etc/init.d/S01bashAsShell
ls -altr /opt/etc/init.d/S05chngProfile
cat /tmp/root/.profile
echo $PATH
echo $SHELL
echo $0
ls -altr /opt/bin/netstat
cat /etc/passwd | awk -F: '{print $7}'

_________________
Asus RT16N + OTRW
Kingston 4GB USB-disk 128 MB swap + 1.4GB ext3 on /opt + 2 GB ext3 on /mnt
Copperjet 1616 modem in ZipB-config
Asterisk, pixelserv & Pound running on router
Another Asus RT16N as WDS-bridge

DD-WRT v24-sp2 vpn (c) 2010 NewMedia-NET GmbH
Release: 12/16/10 (SVN revision: 15758M)
DHC_DarkShadow
DD-WRT Guru


Joined: 22 Jun 2008
Posts: 2440
Location: Am now Dark_Shadow

PostPosted: Sun Oct 18, 2009 23:07    Post subject: Reply with quote
frater wrote:
Code:
echo $PATH
which bash
find / -name netstat
ls -altr /opt/etc/init.d/S01bashAsShell
ls -altr /opt/etc/init.d/S05chngProfile
cat /tmp/root/.profile
echo $PATH
echo $SHELL
echo $0
ls -altr /opt/bin/netstat
cat /etc/passwd | awk -F: '{print $7}'


Result output

Code:
root@WRT54G-TMv11:~# echo $PATH
/bin:/usr/bin:/sbin:/usr/sbin:/jffs/sbin:/jffs/bin:/jffs/usr/sbin:/jffs/usr/bin:
/mmc/sbin:/mmc/bin:/mmc/usr/sbin:/mmc/usr/bin:/opt/sbin:/opt/bin:/opt/usr/sbin:/
opt/usr/bin
root@WRT54G-TMv11:~# which bash
cho $SHELL
echo $0
ls -altr /opt/bin/netstat
cat /etc/passwd | awk -F: '{print $7}' /opt/bin/bash
root@WRT54G-TMv11:~# find / -name netstat
/bin/netstat
/jffs/opt/lib/ipkg/alternatives/netstat
/jffs/opt/bin/netstat
/mmc/jffs/opt/lib/ipkg/alternatives/netstat
/mmc/jffs/opt/bin/netstat
/opt/lib/ipkg/alternatives/netstat
/opt/bin/netstat
/proc/net/netstat
root@WRT54G-TMv11:~# ls -altr /opt/etc/init.d/S01bashAsShell
-rwxr-xr-x    1 root     root          604 Oct 18 17:36 /opt/etc/init.d/S01bashA
sShell
root@WRT54G-TMv11:~# ls -altr /opt/etc/init.d/S05chngProfile
-rwxr-xr-x    1 root     root         1254 Oct 18 17:36 /opt/etc/init.d/S05chngP
rofile
root@WRT54G-TMv11:~# cat /tmp/root/.profile
root@WRT54G-TMv11:~# echo $PATH
/bin:/usr/bin:/sbin:/usr/sbin:/jffs/sbin:/jffs/bin:/jffs/usr/sbin:/jffs/usr/bin:
/mmc/sbin:/mmc/bin:/mmc/usr/sbin:/mmc/usr/bin:/opt/sbin:/opt/bin:/opt/usr/sbin:/
opt/usr/bin
root@WRT54G-TMv11:~# echo $SHELL
/bin/sh
root@WRT54G-TMv11:~# echo $0
-sh
root@WRT54G-TMv11:~# ls -altr /opt/bin/netstat
lrwxrwxrwx    1 root     root           26 Oct 18 11:09 /opt/bin/netstat -> /opt
/bin/net-tools-netstat
root@WRT54G-TMv11:~# cat /etc/passwd | awk -F: '{print $7}'
/bin/sh
/sbin/reboot
root@WRT54G-TMv11:~#


Still unable to display page.

EDIT:

Code:
root@WRT54G-TMv11:~# service
Service:             automount (/opt/etc/init.d/S35automount)
Service:                 samba (/opt/etc/init.d/S80samba)
Service:                 pound (/opt/etc/init.d/S80pound)
Service:              asterisk (/opt/etc/init.d/S90asterisk)
Service:   transmission-daemon (/opt/etc/init.d/S90transmission)
Service:                xinetd (/opt/etc/init.d/S10xinetd)
Service:                 named (/opt/etc/init.d/S09named)
root@WRT54G-TMv11:~# service xinetd on
root@WRT54G-TMv11:~# service xinetd start
root@WRT54G-TMv11:~#


After running

Code:
service xinetd on
service xinetd start


I'm back to getting a bad authorization page

_________________
The New Me
frater
DD-WRT Guru


Joined: 07 Jun 2006
Posts: 2777

PostPosted: Sun Oct 18, 2009 23:15    Post subject: Reply with quote
Somehow /opt/etc/init.d/optS doesn't run....
Does your rc_startup contain the lines to start it?

This should be in there and the mount to /opt should be done before...
Code:
n=1
while [ ! -d /opt/etc/init.d ] ; do
  sleep 3
  [ $n -gt 30 ] && break
  let n+=1
done
/opt/etc/init.d/optS


You can manually run /opt/etc/init.d/optS and then relogin...
You can run those previous commands again...

PS... found the culprit.
I didn't do an 'nvram commit' so the modification to rc_startup and rc_shutdown got lost

A rerun of prep_optware should fix it...

_________________
Asus RT16N + OTRW
Kingston 4GB USB-disk 128 MB swap + 1.4GB ext3 on /opt + 2 GB ext3 on /mnt
Copperjet 1616 modem in ZipB-config
Asterisk, pixelserv & Pound running on router
Another Asus RT16N as WDS-bridge

DD-WRT v24-sp2 vpn (c) 2010 NewMedia-NET GmbH
Release: 12/16/10 (SVN revision: 15758M)
DHC_DarkShadow
DD-WRT Guru


Joined: 22 Jun 2008
Posts: 2440
Location: Am now Dark_Shadow

PostPosted: Sun Oct 18, 2009 23:50    Post subject: Reply with quote
Reinstall and reboot output


When browesing 192.168.1.1:901 I get unable to connect.

frater wrote:
Somehow /opt/etc/init.d/optS doesn't run....
Does your rc_startup contain the lines to start it?

This should be in there and the mount to /opt should be done before...
Code:
n=1
while [ ! -d /opt/etc/init.d ] ; do
  sleep 3
  [ $n -gt 30 ] && break
  let n+=1
done
/opt/etc/init.d/optS


My rc_startup

Code:
mount --bind /mmc/jffs /jffs
mount -o bind /jffs/opt /opt
n=1
while [ ! -d /opt/etc/init.d ] ; do
  sleep 3
  [ $n -gt 30 ] && break
  let n+=1
done
/opt/etc/init.d/optS


My rc_shutdown

Code:
/opt/etc/init.d/optK
umount /jffs/opt /opt
umount /mmc/jffs /jffs


EDIT: A rerun of service

Code:
root@WRT54G-TMv11:~# service
Service:             automount (/opt/etc/init.d/S35automount)
Service:                 samba (/opt/etc/init.d/S80samba)
Service:                 pound (/opt/etc/init.d/S80pound)
Service:              asterisk (/opt/etc/init.d/S90asterisk)
Service:   transmission-daemon (/opt/etc/init.d/S90transmission)
Service:                xinetd (/opt/etc/init.d/S10xinetd) disabled
Service:                 named (/opt/etc/init.d/S09named) disabled
root@WRT54G-TMv11:~#

_________________
The New Me


Last edited by DHC_DarkShadow on Thu Oct 22, 2009 15:28; edited 2 times in total
DHC_DarkShadow
DD-WRT Guru


Joined: 22 Jun 2008
Posts: 2440
Location: Am now Dark_Shadow

PostPosted: Mon Oct 19, 2009 0:19    Post subject: Reply with quote
In trying to fix the unable to connect with SWAT

Code:
root@WRT54G-TMv11:~# service xinetd on
Enable service "xinetd" (/opt/etc/init.d/S10xinetd)
root@WRT54G-TMv11:~# service xinetd start
root@WRT54G-TMv11:~# service named on
Enable service "named" (/opt/etc/init.d/S09named)
root@WRT54G-TMv11:~# service named start
Starting DNS Services: started
root@WRT54G-TMv11:~# service
Service:             automount (/opt/etc/init.d/S35automount)
Service:                 samba (/opt/etc/init.d/S80samba)
Service:                 pound (/opt/etc/init.d/S80pound)
Service:              asterisk (/opt/etc/init.d/S90asterisk)
Service:   transmission-daemon (/opt/etc/init.d/S90transmission)
Service:                xinetd (/opt/etc/init.d/S10xinetd)
Service:                 named (/opt/etc/init.d/S09named)
root@WRT54G-TMv11:~#


Now display's "Bad Authorization" page

EDIT: Clear active logins in Firefox and it gave me the login window again.

So I guess the only problem in that xinetd and named doesn't start automatically.

EDIT2: top no longer works

top output

Code:
root@WRT54G-TMv11:~# top
Segmentation fault

_________________
The New Me
frater
DD-WRT Guru


Joined: 07 Jun 2006
Posts: 2777

PostPosted: Mon Oct 19, 2009 6:41    Post subject: Reply with quote
I can't replicate the 'top' problem.
Both 'tops' are working here.
The optware top and the /usr/bin/top (dd-wrt's).

First we need to find out which top is giving the problem. There's actually a program called 'which' which is helpful with that....

Code:

which top
type top
/usr/bin/top
/opt/bin/top
echo $PATH
echo $LD_LIBRARY_PATH




Also do a reboot, wait before the router settles down and login again to see if it still has the problem.
If the problem is with DD-WRT's top it is possible your library is smaller... Anyhow... 'top' should execute optware's top unless your PATH is not properly set...

Of course this should work properly but in the mean time you can use htop which has more possibilities.

Quote:
EDIT: Clear active logins in Firefox and it gave me the login window again.

So I guess the only problem in that xinetd and named doesn't start automatically.

I knew that and assumed you'll find out...

_________________
Asus RT16N + OTRW
Kingston 4GB USB-disk 128 MB swap + 1.4GB ext3 on /opt + 2 GB ext3 on /mnt
Copperjet 1616 modem in ZipB-config
Asterisk, pixelserv & Pound running on router
Another Asus RT16N as WDS-bridge

DD-WRT v24-sp2 vpn (c) 2010 NewMedia-NET GmbH
Release: 12/16/10 (SVN revision: 15758M)
frater
DD-WRT Guru


Joined: 07 Jun 2006
Posts: 2777

PostPosted: Mon Oct 19, 2009 6:53    Post subject: Reply with quote
DHC_DarkShadow wrote:

root@WRT54G-TMv11:~# service
Service: automount (/opt/etc/init.d/S35automount)
Service: samba (/opt/etc/init.d/S80samba)
Service: pound (/opt/etc/init.d/S80pound)
Service: asterisk (/opt/etc/init.d/S90asterisk)
Service: transmission-daemon (/opt/etc/init.d/S90transmission)
Service: xinetd (/opt/etc/init.d/S10xinetd)
Service: named (/opt/etc/init.d/S09named)
root@WRT54G-TMv11:~#[/code]

Unless you really need them you should disable the following services: asterisk, named and pound because they take precious resources...
Code:
service asterisk off
service named off
service pound off
service asterisk stop
service named stop
service pound stop


Same goes for transmission.... (a bittorrent client)

_________________
Asus RT16N + OTRW
Kingston 4GB USB-disk 128 MB swap + 1.4GB ext3 on /opt + 2 GB ext3 on /mnt
Copperjet 1616 modem in ZipB-config
Asterisk, pixelserv & Pound running on router
Another Asus RT16N as WDS-bridge

DD-WRT v24-sp2 vpn (c) 2010 NewMedia-NET GmbH
Release: 12/16/10 (SVN revision: 15758M)
Goto page Previous  1, 2, 3, 4 ... 157, 158, 159  Next Display posts from previous:    Page 3 of 159
Post new topic   This topic is locked: you cannot edit posts or make replies.    DD-WRT Forum Index -> Broadcom SoC based Hardware 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 can attach files in this forum
You can download files in this forum