Unfortunately no one can be told what fun_plug is - you have to see it for yourself.
You are not logged in.
So my system has a binary 'busybox' in /bin
Obviously this is being called by default which I know I can get around with my PATH and what...
What have all of you done to install the new busybox over the old? (or make them coexist)
-Ben
Offline
/bin/busybox will be called directly very rarely. So you can just replace all symlinks you like. But you have to do this at every boot-up. Personally I don't suggest you do to so. If you want some new applets then just set custom bin directory to your hard disk and add it to PATH.
Offline
well my fun_plug
fun_plug wrote:
#!/bin/sh
set -x
FUNDIR=$1
cd ${FUNDIR:=/mnt/HD_a2/fun_plug.d}
for FUNPLUG in *
do
[ -x $FUNDIR/$FUNPLUG ]&& . $FUNDIR/$FUNPLUG
done
the content of /mnt/HD_a2/fun_plug.d
fun_plug.d wrote:
00telnet 10CorrWeb 20crontab 20edna 99BugWifi
01local 10StopUpnp 20dyndns 20lprng
00telnet wrote:
#!/bin/sh
if [ ! -e /mnt/HD_a2/ash ]
then
ln -s /mnt/HD_a2/busybox /mnt/HD_a2/ash
fi
if [ ! `grep root /etc/shadow` ]
then
echo kontroll.`grep admin /etc/shadow` >> /etc/shadow
/mnt/HD_a2/sed -i -e 's/kontroll.admin/root/' /etc/shadow
fi
/mnt/HD_a2/sed -i -e 's/root:.*/root:x:0:0:Linux User,,,:\/:\/mnt\/HD_a2\/ash/' /etc/passwd
cd /dev && /mnt/HD_a2/busybox makedevs ptyp c 2 0 0 9
cd /dev && /mnt/HD_a2/busybox makedevs ttyp c 3 0 0 9
/mnt/HD_a2/busybox telnetd &
#fin telnetd
01local wrote:
#!/bin/sh
ln -sf /mnt/HD_a2/busybox /bin/vi
ln -sf /mnt/HD_a2/local /usr/local
ln -sf /mnt/HD_a2/local/etc/profile /etc/profile
PATH=/usr/local/bin:/usr/local/sbin:$PATH
10CorrWeb wrote:
#!/bin/sh
if [ ! -e /mnt/HD_a2/web]
then
cp /sys/crfs/web_page /mnt/HD_a2/web -R
rm /mnt/HD_a2/web/formatInternalHD*
fi
rm /web/web
ln -s /mnt/HD_a2/web /web/web
#fin correction bugs webs
10StopUpnp wrote:
#!/bin/sh
#Stop the unpnp stuff
for N in $(pidof upnp); do kill $N;done
20crontab wrote:
#!/bin/sh
crontab /mnt/HD_a2/local/etc/crontab
you saw that i use a /mnt/HD_a2/local directory to put all you can found under usr/local in common distro
# ls local
bin etc lib libexec man sbin spool
and the profile
# more local/etc/profile
#!/bin/sh
echo profile local
PATH=/mnt/HD_a2/local/bin:/mnt/HD_a2/local/sbin:$PATH
export PATH
LD_RUN_PATH=/mnt/HD_a2/lib:/lib:/usr/lib
export LD_RUN_PATH
LD_LIBRARY_PATH=$LD_RUN_PATH
export LD_LIBRARY_PATH
cd /mnt/HD_a2
Last edited by BertrandB (2007-07-18 21:59:36)
Offline
This is good way to handle custom binaries and hacks if you still use D-Link firmware and not gentoo or debian (flashed or loaded using loader.o)
Offline
It's always nice to see others' implementations of things.. which is what I was looking for here...
Nice... Thanks for the info.
Has anyone compiled ISC DNS/DHCP for this thing? Could I put in a request for that? That would be funny to see run.
-Ben
Offline
BertrandB,
The 10StopUpnp and 10CorrWeb scripts listed above appear to be the same script.
Also, what version of firmware are you running with? Trying to emulate your method for the fun_plug but running into issues.
Thanks for your help,
ICF
Offline
IrishCubsFan wrote:
BertrandB,
Just Bertrand
IrishCubsFan wrote:
The 10StopUpnp and 10CorrWeb scripts listed above appear to be the same script.
Oups ... corrected in the original messages
IrishCubsFan wrote:
Also, what version of firmware are you running with? Trying to emulate your method for the fun_plug but running into issues.
I'm in 1.02us but it would work with 1.02eu.
For the fun_plug and the script in fun_plug.d two points very important :
They must be linux text file (not dos only LF not CR+LF)
They must have the execute right.
Offline
I am new to linux so forgive me for sounding childish.
In the layout that Bertrand presents, where does one get the contents that goes into /mnt/HD_a2/web, /mnt/HD_a2/sed, /mnt/HD_a2/ash, /mnt/HD_a2/busybox???
Are these precompiled for the DSM-G600? Are there specific instructions to populating these folders on the DSM-G600?
I am new, but I am willing to publish a user doc for doing this so that anyone who desires can follows steps to install these items to get telnetD support working on the unit without much effort. To a Linux Guru as most here are (compared to me) this is way too elementary....But to most new purchasers of the DSM-G600 like me who are coming from a MS world and trying to learn all we can about Linux, a document detailing what and why these things are done would be TREASURED!
I want to learn and I want to help too.
Offline
Shouldn't I be able to
o collect all of the files/folders (Zipped) necessary to populate /mnt/HD_a2/...,
o FTP it to the D-Link
o make a Fun_Plug that unzips the copied files and creates all files necessary respectively and rewrites the "final" fun_plug
o Finally rebooting so that telnetD is working
Your advice please
Offline
As a Windows novice moving to Linux, I've just created my TelnetD using instructions at http://dns323.kood.org/dsmg600/howto:telnet.
After understanding that page a little better, I learned a lot that I did NOT know when I started asking questons, here. I now understand that the questions about /mnt/HD_a2, earlier are about files that are created by a Tar (unzipping) of a downloaded container and are NOT foldernames that I thought they were.
This experience has only netted me a feeling of completing a necessary task. In terms of learning, I do NOT have a better concept of how these pieces go together yet.
If I could help, I would rewrite the directions a "little" differently for the pure elementary people like myself.
Offline
I followed the instructions and can get a Telnet login screen. But, I cannot get any commands to work. I tyoe a command, but I don't get any responses on my telnet window???
Off-line login: admin
Password:
warning: cannot change to home directory
BusyBox v1.00-pre1 (2005.10.27-08:04+0000) Built-in shell (ash)
Enter 'help' for a list of built-in commands.
help
(Nothing happens ???? )
Offline
GCMartin wrote:
I followed the instructions and can get a Telnet login screen. But, I cannot get any commands to work. I tyoe a command, but I don't get any responses on my telnet window???
Off-line login: admin
Password:
warning: cannot change to home directory
BusyBox v1.00-pre1 (2005.10.27-08:04+0000) Built-in shell (ash)
Enter 'help' for a list of built-in commands.
help
(Nothing happens ???? )
You have not followed instructions correctly. Please post your fun_plug file content along with the file list you have at the root of your hard disk.
Offline