DSM-G600, DNS-3xx and NSA-220 Hack Forum

Unfortunately no one can be told what fun_plug is - you have to see it for yourself.

You are not logged in.

Announcement

#1 2008-12-19 04:38:37

ttmcmurry
Member
Registered: 2008-08-08
Posts: 15

how do you change files in /etc or remove dlink bittorrent

I'm trying to change /etc/rc.sh so that it doesn't call:

/sys/crfs/sbin/wyc_check_bt
/usr/sbin/start_bt

Basically I want the D-Link Bittorrent client to stop loading so I can delete it from the 323. 

What I've been doing is:

cp rc.sh rcbackup.sh
joe rc.sh
comment out (#) the above entries and ^kx to save and exit

I've gone back in at this point with joe to verify the changes were saved.  So I figure I have my backup and the changed rc.sh and now it's safe to reboot.  So I issue 'reboot' and the 323 goes down.  In a few seconds it comes back up.  I run 'top' and voila the BT daemon is running.  Check out the /etc folder and the rcbackup.sh is missing and looking at rc.sh all of the changes were backed out. 

Am I doing something wrong, or is the 323 simply copying everything from mtd1 back over?  Is there a way to push the changed rc.sh into mtd1?  Or is there a way simpler, easier, and more effective way to remove the BT client? 

Travis

Offline

 

#2 2008-12-19 10:57:32

fonz
Member / Developer
From: Berlin
Registered: 2007-02-06
Posts: 1716
Website

Re: how do you change files in /etc or remove dlink bittorrent

ttmcmurry wrote:

Or is there a way simpler, easier, and more effective way to remove the BT client?

Yes. Click 'search' above, enter 'uninstall bittorrent', hit 'submit', read.

Offline

 

#3 2008-12-19 15:45:06

ttmcmurry
Member
Registered: 2008-08-08
Posts: 15

Re: how do you change files in /etc or remove dlink bittorrent

When I woke up and read my email I got all excited that fonz himself replied to my question.  Then I read the answer and was was filled with "oh, duh, i did that" sad

The searches I ran for "uninstall bittorrent" prior to posting had simple responses such as

"just go to the Nas_Prog folder and delete the BT folder"
"in the BT folder, chown to root and chmod to 777 and then rm all of the files"

Neither of those worked in my case. Both the example left the executables in the BT folder, while deleting the other two files BT creates at runtime.  That's why I took the "edit the rc.sh" approach.  If this was a Windows server I wouldn't have made this post in the first place, there are many different easy ways to delete files.   D-Link doesn't have an uninstaller for Bittorrent and the 323 isn't like an Ubuntu install on x86 desktops.  I asked an educated question so I can learn what I'm doing wrong and how to do it correctly so I don't end up with a brick.

Offline

 

#4 2008-12-19 17:06:03

fonz
Member / Developer
From: Berlin
Registered: 2007-02-06
Posts: 1716
Website

Re: how do you change files in /etc or remove dlink bittorrent

ttmcmurry wrote:

"oh, duh, i did that" sad

You should have told us in the first place.

Still, I don't understand why deleting the files doesn't work for you. Admittedly, I never installed the Dlink bittorrent myself, but the instructions look simple and clear. Did you try telnetting into your box (as root) and using rm to delete the files, maybe killing the bt process beforehand?

Offline

 

#5 2008-12-19 18:13:48

ttmcmurry
Member
Registered: 2008-08-08
Posts: 15

Re: how do you change files in /etc or remove dlink bittorrent

Yes, I'm logging in as root when I do this.  When I kill the 6 PIDs for BT (kill #####), they spawn again with new PIDs.  My guess is that's why it's a daemon, if I could kill the daemon then I could delete the files.

Last edited by ttmcmurry (2008-12-19 18:20:14)

Offline

 

#6 2008-12-19 19:11:24

fonz
Member / Developer
From: Berlin
Registered: 2007-02-06
Posts: 1716
Website

Re: how do you change files in /etc or remove dlink bittorrent

ttmcmurry wrote:

My guess is that's why it's a daemon, if I could kill the daemon then I could delete the files.

Remove the files without killing the daemon, then.

Offline

 

#7 2008-12-19 20:46:04

ttmcmurry
Member
Registered: 2008-08-08
Posts: 15

Re: how do you change files in /etc or remove dlink bittorrent

You asked...

fonz wrote:

Did you try telnetting into your box (as root) and using rm to delete the files, maybe killing the bt process beforehand?

I replied...

ttmcmurry wrote:

Yes, I'm logging in as root when I do this.  When I kill the 6 PIDs for BT (kill #####), they spawn again with new PIDs.

You suggested...

fonz wrote:

Remove the files without killing the daemon, then.

...which is the original problem:

ttmcmurry wrote:

Both the example left the executables in the BT folder, while deleting the other two files BT creates at runtime.

We're back at square one.  How do I do this?

Last edited by ttmcmurry (2008-12-19 20:46:35)

Offline

 

#8 2008-12-19 23:17:15

fonz
Member / Developer
From: Berlin
Registered: 2007-02-06
Posts: 1716
Website

Re: how do you change files in /etc or remove dlink bittorrent

ttmcmurry wrote:

We're back at square one.  How do I do this?

Maybe like this:

Code:

cd /mnt/HD_a4
rm -rf Nas_Prog

Not sure if it's HD_a4, and if it's called Nas_Prog.

Offline

 

#9 2008-12-20 18:48:09

ttmcmurry
Member
Registered: 2008-08-08
Posts: 15

Re: how do you change files in /etc or remove dlink bittorrent

Finally.  -rf made the difference.

So- boys and girls if you want to remove / uninstall Bittorrent and the other forums haven't helped:

1)  login as root
2)  cd to /mnt/HD_a2 -or- /mnt/HD_a4  (depending on your setup)
3)  type "rm -rf /Nas_Prog"
4)  type "ls -l" to see if the folder deleted
5)  reboot the 323
6)  log into the download area of the gui
7)  click on the bittorrent tab, you should receive a message stating "to install bittorrent..."

Done.

Thanks fonz

Last edited by ttmcmurry (2008-12-20 19:01:06)

Offline

 

#10 2008-12-20 18:51:15

fonz
Member / Developer
From: Berlin
Registered: 2007-02-06
Posts: 1716
Website

Re: how do you change files in /etc or remove dlink bittorrent

ttmcmurry wrote:

2)  go to /mnt/HD_a2 -or- /mnt/HD_a4  (depending on your setup)
3)  type "rm -rf /Nas_Prog"

That looks wrong. cd in step 2 makes no sense with 'rm -rf /Nas_Prog'. Do you mean 'rm -rf Nas_Prog'?

Offline

 

#11 2008-12-20 19:00:37

ttmcmurry
Member
Registered: 2008-08-08
Posts: 15

Re: how do you change files in /etc or remove dlink bittorrent

Worked exactly as i typed it.

Offline

 

#12 2009-11-26 11:48:13

Thiam
Member
Registered: 2007-06-18
Posts: 43

Re: how do you change files in /etc or remove dlink bittorrent

You can also temporarily disable the bittorrent client:

cd /mnt/HD_a2/Nas_Prog/BT
chmod a-x bt
chmod a-x btdog
reboot

To enable again, change a-x to a+x.

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2010 PunBB