# Tweak.sh Causes Network Problem



## Knocka (May 11, 2002)

I have been trying to solve a connectivity problem, and been troubleshooting. When I first install a freshly zippered drive in my DTV, I can connect to the DTV over the network with no problem. But, as soon as I run, tweak.sh, the connection "breaks."

I compared the rc.sysinit.author files both before and after tweak.sh. They are set forth below. In short, I have concluded (perhaps wrongly), that tweak.sh is not correctly creating a new rc.sysinit.author file. Can anyone explain or help.

Here are the before and after files:

BEFORE:
#!/bin/bash
export PATH=./:.:/utils:/bin:/sbin:/tvbin:/tivobin:/busybox
export TIVO_ROOT=
export MFS_DEVICE=/dev/hda10
tnlited 23 /bin/bash -login &
tivoftpd
fakecall.tcl
route add -host 204.176.49.2 gw 127.0.0.1
route add -net 204.176.49.0 gw 127.0.0.1 netmask 255.255.255.0
/bin/bash </dev/ttyS2&> /dev/ttyS2&
echo
if [ -e /firstboot_flag ]; then
mount -o remount,rw /
if rm -rf /firstboot_flag; then
tivosh /hacks/network.tcl 192.168.15.123 192.168.15.1 
mount -o remount,ro /
reboot
fi
fi

AFTER:
#############################################
# starting EndPadPlus
tivosh /enhancements/endpadplus.tcl 0 1 -seq -auto >> /dev/null &

#############################################
# starting Tivowebplus
/enhancements/TWPrun.sh

#############################################
# start crond after waiting 30 seconds
sleep 30
/busybox/crond
fi

I appreciate the help.
Knocka


----------



## Gunnyman (Jul 10, 2003)

that's certainly strange.
is there a backup author file? There should be one created by tweak.sh.
What are the contents of it?


----------



## Knocka (May 11, 2002)

The backup author file is the same as the BEFORE version I originally posted, except it had the old ip address of 192.168.1.123. All of this is caused, by the way, because I simply wanted to change the IP address of the tivo because I had to change my home ip address scheme from 192.168.1.xxx to 192.168.15.xxx (because of a VPN issue connnected to my office, but that is a whole other problem I am efforting -- don't ask).

I would really like to use a dynamic IP on the Tivo if that is possible. I have a router that will do static dhcp, and I know the MAC address of the NIC in the TiVo.

Anyway, what i was going to do was run the tweak.sh again, and then, before rebooting, edit the author file, but I am not sure which commands are necessary for networking (and I have no idea which command to use for dhcp). My hope was to be able to ftp to the tivo with filezilla, copy the author file and edit it with win32pad, then copy it back. 

Will this work? Again, I appreciate the help.
Knocka


----------



## Gunnyman (Jul 10, 2003)

to keep telnet and ftp make sure the lines calling tnlited and tivoftpd are in there.
as for changing the IP and enabling dhcp, why not use the netconfig tool in tivoweb?


----------



## Knocka (May 11, 2002)

Because I cannot get tivoweb running because every time I run tweak.sh, i lose connectivity.

What about the lines that seem to set the ip address and gateway?

Also, will my plan to change the author file AFTER running tweak.sh but BEFORE rebooting work?

Thanks.


----------



## Gunnyman (Jul 10, 2003)

```
#!/bin/bash
export TIVO_ROOT=""
export MFS_DEVICE=/dev/hda10
export PATH=./:.:/utils:/bin:/sbin:/tvbin:/tivobin:/busybox
# start telnet
tnlited 23 /bin/bash -login &
# start ftp
tivoftpd
# Enable Serial bash
/bin/bash </dev/ttyS2&> /dev/ttyS2&
# add two static routes so the tivo doesn't phone home
route add -host 204.176.49.2 gw 127.0.0.1
route add -net 204.176.49.0 gw 127.0.0.1 netmask 255.255.255.0
```
this is a good basic author file. It will get the job done.
as long as it is in place before a reboot it will work just fine.


----------



## Da Goon (Oct 22, 2006)

If tweak screws up your author file with a new ip, then just run tweak and edit your author file in vi or joe and edit out the network lines before you reboot. If running the zipper set your network settings correctly, then theres no need to try to re-set them while running tweak.


----------



## Knocka (May 11, 2002)

I managed to get t working, but still have a few problems:

(1) When tweak.sh ran, it hung when I told it to install channel logo slices. I had to shut the telnet window and run tweak again. Same result. Finally, I said no to channel logo slices and it installed. Any help on this issue would be appreciated.
(2) It created a strange author file which I had to edit as described here and by JW. I did this before reboot, and when it rebooted, I was still able to connect.
(3) Tivowebplus is not running on startup.
(4) The TWP update module would not work.

Anyway. Thanks to everyone for their help and patience.

chris


----------



## rbautch (Feb 6, 2004)

Knocka said:


> I managed to get t working, but still have a few problems:
> 
> (1) When tweak.sh ran, it hung when I told it to install channel logo slices. I had to shut the telnet window and run tweak again. Same result. Finally, I said no to channel logo slices and it installed. Any help on this issue would be appreciated.
> (2) It created a strange author file which I had to edit as described here and by JW. I did this before reboot, and when it rebooted, I was still able to connect.
> ...


1. The logo slices take a long time to install. Try letting run for awhile, or try to dbload them yourself to see if the same thing happens.

2. It appends those lines to your author file, so I suspect that somewhere along the line your author file got blanked, so the only thing that remained was the appended lines. I've seen this happen only once before, and it was related to using sed to edit a file. A possible culprit could be these lines, which I use to add the enhancements directory to your PATH in your author file:

```
cat /etc/rc.d/rc.sysinit.author | sed -e '/PATH=/s/$/:\/enhancements/' > /etc/rc.d/rc.sysinit.author2
mv /etc/rc.d/rc.sysinit.author2 /etc/rc.d/rc.sysinit.author
chmod 755 /etc/rc.d/rc.sysinit.author
```
If you don't mind, try entering these lines manually into bash, one by one, which might help me to isolate the problem.

3. Because you're running a pretty old version of the script.

4. Same thing.


----------



## Knocka (May 11, 2002)

I am not sure what you mean. Do you want me to open a telnet session, and then at the bash prompt, enter each line that you specified. I tried that and here are the results, in the order of the commands you provided:

(1) It returns: bash: /etc/rc.d/rc.sysinit.author2: Read-only file system
(2) No such file or directory
(3) Returned a blank bsah prompt. What did the last command do?

Knocka


----------



## JWThiers (Apr 13, 2005)

Knocka said:


> I am not sure what you mean. Do you want me to open a telnet session, and then at the bash prompt, enter each line that you specified. I tried that and here are the results, in the order of the commands you provided:
> 
> (1) It returns: bash: /etc/rc.d/rc.sysinit.author2: Read-only file system
> (2) No such file or directory
> ...


Try again but this time before any of that typr rw. That should enable read write.


----------



## ttodd1 (Nov 6, 2003)

Knocka said:


> (3) Returned a blank bsah prompt. What did the last command do?
> 
> Knocka


Basically changes the permissions on the file, a blank prompt after is normal.


----------



## Knocka (May 11, 2002)

rbautch:

I started by typing rw and then entering all the lines, as follows:
(1) cat /etc/rc.d/rc.sysinit.author | sed -e '/PATH=/s/$/:\/enhancements/' > /etc/rc.d/rc.sysinit.author2
(2) mv /etc/rc.d/rc.sysinit.author2 /etc/rc.d/rc.sysinit.author
(3) chmod 755 /etc/rc.d/rc.sysinit.author

All that happened was that after entering each line and hitting return, I was returned to a bash prompt.

I have no idea what those lines did. And since they did not provide any messages, I don't see how they can help you isolate the problem.

Knocka


----------

