PDA

View Full Version : .bashrc not working


jasongt
10-10-2001, 11:02 PM
Ok I have placed a .bashrc file in the root of tivo on partition 7. The bash file is

#
# bash shell startup commands
#
# set faster speed
stty 115200
#
# set normal communication parameters
stty sane
#
# set the search path to search new directories
PATH=$PATH":/var/devbin:/var/hack"
#
# set the prompt to display current working directory
PS1="\w\\$ "
#
# set the terminal to ansi for apps that need screen control
TERM="ansi"
#
# set the ls command to always display long mode and color tags
alias ls='ls --color -l'
#
# go to my working directory
cd /var/hack

The command I have @ the end of the rc.sysinit file is

exec < /dev/ttyS3 >& /dev/ttyS3; bash --login

Do I need to do anything to the .bashrc file?

Thanks,
Jason

winter
10-10-2001, 11:42 PM
Jason, I just transferred using zmodem (rz -a) to the root directory and that was it - next reboot I could tell it was working from the prompt change, here's my file attributes:

/var/hack#
/var/hack# cd /
/#
/# ls .bashrc
-rw------- 1 0 0 480 Oct 8 18:30 .bashrc
/#


Sorry, I dont have any idea what could be wrong with your setup.

jasongt
10-10-2001, 11:51 PM
What command do you have in the rc.sysinit file? I am thinking mine could be wrong. That is the file attribs I have also.

Thanks,
Jason

winter
10-11-2001, 01:05 AM
These are the last 3 lines of my file:

echo "rc.sysinit is complete"
/tvbin/DTivoFix
/bin/bash </dev/ttyS3 >& /dev/ttyS3 &


If your bash line was wrong I dont think you would be getting the bash prompt at all

mrblack51
10-11-2001, 02:24 AM
try making a .profile in your home directory and putting the info from .bashrc in there. you may want to do something like

export HOME=/var/hack

in your rc.sysinit

jasongt
10-11-2001, 01:34 PM
Originally posted by winter
These are the last 3 lines of my file:

echo "rc.sysinit is complete"
/tvbin/DTivoFix
/bin/bash </dev/ttyS3 >& /dev/ttyS3 &


If your bash line was wrong I dont think you would be getting the bash prompt at all


I changed my rc.sysinit to have you command init and it worked as soon as I rebooted. I used a command posted in the FAQ I think. Also does you scipt require that it call out daily?

Thanks,
Jason

winter
10-11-2001, 08:28 PM
Originally posted by jasongt
I changed my rc.sysinit to have you command init and it worked as soon as I rebooted. I used a command posted in the FAQ I think. Also does you scipt require that it call out daily?

Great, glad its working now.

I dont know where I got my bash cmd from but I thought it was the FAQ, could have been a random post.

AFAIK the script only needs to be run once every 30 days however it doesnt hurt to run it every day. I also have a call to it in my TClient script file as well (I was trying different things before I figured out that the DTivoFix file was the problem).

okleydokley
10-23-2001, 02:52 PM
I am a bit confused on where files are actually located, and where to store files... I usually take the drive out and put it into a computer because I can't seem to get any linux commands working from the bash prompt.

1. When someone says to put fixup in the /var/hack directory, is that actually in /dev/hda9/hack ???

2. What about the root directory? is that /dev/hda7 ??

3. Where should I put all the linux commands? Do I have to do anything to them to make the work (chmod, chattr?) My biggest needs are LS and JOE...

4. One other newbie question, is there anyway to delete a file or a directory I created by accident?

Thanks...

genericuser
10-23-2001, 03:53 PM
1) yes, this is because the /etc/fstab file mounts /dev/hda9 onto the /var mount point. So, when people say /var/hack, it becomes /dev/hda9/hack.

2) the root directory is EITHER /dev/hda4 OR /dev/hda7. If the unit is virgin, then only one of the partitions will even be mountable (typically /dev/hda7). If the unit has taken a software update, then both /dev/hda7 and /dev/hda4 will be mountable.

3) I put all my command in /devbin. It is alreay in the $PATH variable (that is good). Make certain you chattr +i everything you put in there.
The only things you need to verify in order have them work is that you chmod 755 them (make them executable). The ls and chmod commands should already be in the /bin area on the A drive.

4) if the dir is empty a rmdir <dirname> will do it. Otherwise a rm -rf <dirname> will do it.

KenLi
10-23-2001, 06:09 PM
also if you just need to delete a file cd to dir then
rm <filename>
will do it. (might have to un-chattr first ??) I didn't know ls was already there but if it's not working then the . <tab><tab> (dot space tab tab) helps for seeing what's in the current dir on the tivo. I try to do it all on the tivo from a termial and things pretty much stay consistent. I've gotta get Joe on there too... yes sure fun learning linux just for this purpose! Really...

genericuser
10-24-2001, 11:43 AM
Well, if you indeed dont have the ls command, use:


echo *

to get a directory listing