PDA

View Full Version : vi and bcron


watchingTV
01-12-2005, 09:39 PM
I copied the auto folder in bcron's files to my tivo in the /var/hack and now have the /var/hack/auto. I have run the chmod -R 777 /var/hack/auto command via tera term and am now ready to add the following to hackinit:

#bcron sheduler
echo "Starting bcron..... " > /dev/ttys2
/var/hack/auto/bcron &

when I type vi hackinit: this is what I get


~
~

~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
"hackinit" line 1 of 1 --100%--

Not sure what to do from here, what am I missing?

PlainBill
01-12-2005, 11:20 PM
:rolleyes: You're creating hackinit. What you're seeing is an empty file - all ready for you to start typing.

PlainBill

watchingTV
01-13-2005, 12:11 AM
That is what I thought so I was going to start entering the info but as soon as I hit # sign this is what I get

'#' is not implemented

is the #bcron sheduler a command and I need to be entering it with the control key depressed or should I enter the i first for insert text mode?

watchingTV
01-13-2005, 12:21 AM
I entered i to get into the insert text mode then entered the following

#bcron sheduler
echo "Starting bcron..... " > /dev/ttyS2
/var/hack/auto/bcron &


rebooted the unit and am still getting the dialtone failed when I force the call. I know I must be over looking something simple.

PlainBill
01-13-2005, 12:24 AM
Yeah, vi starts in command mode. Hit i to go to edit mode. The Esc returns you to command mode. By no means is vi an editor whose commands are intuitive. Here's a reference. (http://www.comptechdoc.org/os/linux/usersguide/linux_ugvi.html)

PlainBill

watchingTV
01-13-2005, 12:32 AM
I entered the info in hackinit
rebooted then went to /var/hack/auto/daily via teraterm and then executed 31fixsub.tcl, now in the tivo setting it show that it has made a successul call but when I select the record button the unit starts the dial thing again and fails the dialtone and will not allow the unit to record.

Oh after entering the following info

#bcron sheduler
echo "Starting bcron..... " > /dev/ttyS2
/var/hack/auto/bcron &

I hit ctrl ZZ to end

psxboy
01-13-2005, 12:58 PM
I hit ctrl ZZ to end

Instead of suspending vi, try saving the file & exiting. ;)

In command-mode:
:wq

...will write the file, then quit vi

-psxboy

watchingTV
01-13-2005, 01:00 PM
Kewl, thanks, I'll give it a shot when I get home this evening and post the result.

watchingTV
01-13-2005, 11:35 PM
the directions have this


add this to your hackinit:

#bcron sheduler
echo "Starting bcron..... " > /dev/ttyS2
/var/hack/auto/bcron &

when I start to do this in vi do I type

vi hackinit:

or do I leave the colon out? I see the colon in front of several of the commands but not sure if I should add that when I am about start.

psxboy
01-14-2005, 01:13 PM
when I start to do this in vi do I type

vi hackinit:

or do I leave the colon out? I see the colon in front of several of the commands but not sure if I should add that when I am about start.

The "vi" part says to start the vi program. The next argument is the filename you want to open/create. Unless you want to name your file "hackinit:" (which you probably don't) you should leave the colon out of the filename.

ie. "vi hackinit"

Once vi is running, however, most commands start with ":".

ie. ":wq"

Hope that helps. Do yourself a favor & google "vi usage" and familiarize yourself with how to use it. It'll save you a lot of headaches in the future.

-psxboy

BeagleBoy
01-14-2005, 07:41 PM
I hit ctrl ZZ to end

Instead of suspending vi, try saving the file & exiting. ;)



Just for clarity's sake, ZZ (caps, with no ctrl) is a shortcut for ":wq" when in command mode.

I still remember my first exposure to vi, in assembly language class. They had macros assigned to function keys for some of the common commands, so they didn't give us a reference. Evil.

-Jim