Re: Well, I broke it! FreeBSD V8.1 release

2010-12-23 Thread Dave
On 22 Dec 2010 at 9:49, Chris Brennan wrote:

 IIRC ';' isn't a valid bash comment ... (which has been previously
 discussed elsewhere). It's usually safer to use '#' for  comment in
 /etc/rc.conf and other system config files as they typically use BASH
 style structs.
 

Accepted and acknowledged as my finger trouble.
As earlier, that issue is now fixed.

Thanks.

Dave B.

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Well, I broke it! FreeBSD V8.1 release

2010-12-22 Thread Dave
Hi...

I was trying to disable the console screensaver, and found that in 
sysinstall, there is no way to select none as an option.

So I went and edited /etc/rc.conf to comment out the line:-
Saver=fire (or whatever it is)

I put a ; at the beginning of the line, and now FreeBSD wont come up, 
showing an error (unexpected ;) and leaving me with a # prompt.

How do I get to re-edit rc.conf, to correct the problem, as all command 
line commands result in a not found error.

Also.  What's the Correct way to disable a console screensaver?

Sysinstall alows you to select and enable one, but not remove it!

Bit of an oversight that I suspect

Regards.

Dave B.  (Chief numpty!)



___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Well, I broke it! FreeBSD V8.1 release

2010-12-22 Thread Chris Rees
Your PATH isn't set.

# fsck /
# mount -uw /
# /bin/sed -i.bak -e 's/^;//' /etc/rc.conf

Or (can't remember where des is kept)

# fsck /usr
# mount /usr
# /usr/bin/sed -i.bak -e 's/^;//' /etc/rc.conf

Good luck!

Chris



Sorry for top-posting, Android won't let me quote, but K-9 can't yet do
threading.
On 22 Dec 2010 11:01, Dave d...@g8kbv.demon.co.uk wrote:
 Hi...

 I was trying to disable the console screensaver, and found that in
 sysinstall, there is no way to select none as an option.

 So I went and edited /etc/rc.conf to comment out the line:-
 Saver=fire (or whatever it is)

 I put a ; at the beginning of the line, and now FreeBSD wont come up,
 showing an error (unexpected ;) and leaving me with a # prompt.

 How do I get to re-edit rc.conf, to correct the problem, as all command
 line commands result in a not found error.

 Also. What's the Correct way to disable a console screensaver?

 Sysinstall alows you to select and enable one, but not remove it!

 Bit of an oversight that I suspect

 Regards.

 Dave B. (Chief numpty!)



 ___
 freebsd-questions@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to 
freebsd-questions-unsubscr...@freebsd.org
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Well, I broke it! FreeBSD V8.1 release

2010-12-22 Thread Odhiambo Washington
On Wed, Dec 22, 2010 at 2:27 PM, Chris Rees utis...@gmail.com wrote:

 Your PATH isn't set.

 # fsck /
 # mount -uw /
 # /bin/sed -i.bak -e 's/^;//' /etc/rc.conf

 Or (can't remember where des is kept)

 # fsck /usr
 # mount /usr
 # /usr/bin/sed -i.bak -e 's/^;//' /etc/rc.conf


For someone who asked a question like the OP, this is a too advanced to
understand.
mount -u / is almost enough unless he cold-booted the computer at some
point. Yes, it's safe to do fsck I agree.
Just tell the poster that it id necessary to edit /etc/rc.conf by doing xyz.



-- 
Best regards,
Odhiambo WASHINGTON,
Nairobi,KE
+254733744121/+254722743223
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
Damn!!
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Well, I broke it! FreeBSD V8.1 release

2010-12-22 Thread b. f.
dave wrote:
...
I was trying to disable the console screensaver, and found that in
sysinstall, there is no way to select none as an option.

So I went and edited /etc/rc.conf to comment out the line:-
Saver=fire (or whatever it is)

I put a ; at the beginning of the line, and now FreeBSD wont come up,
showing an error (unexpected ;) and leaving me with a # prompt.

How do I get to re-edit rc.conf, to correct the problem, as all command
line commands result in a not found error.

You didn't provide much information, but probably what happened is
that your defective rc.conf caused an error when booting, and your
normal boot aborted and dropped into single-user. This typically
means that some partitions that are mounted by default during a normal
boot and that contain editors and other programs are not initially
mounted.  So probably if you did something like:

fsck -p /
mount -uw /
swapon -a
mount -a

you could then edit /etc/rc.conf with your favorite editor. Or you
could just use sed, ed, or vi from /rescue, or from the release media,
to make the necessary changes, rather than attempting to mount all
partitions.


Also.  What's the Correct way to disable a console screensaver?

Sysinstall alows you to select and enable one, but not remove it!

On the fly, you can use vidcontrol -t ...

To change the default setting, comment out or delete the  saver=...
line, or change it to

saver=NO

which is what is originally in /etc/defaults/rc.conf.

Sysinstall is only one tool you can use to install or configure the
system.  It's not necessary, and for minor changes like this, it's not
the method of choice.

b.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Well, I broke it! FreeBSD V8.1 release

2010-12-22 Thread Erik Trulsson
On Wed, Dec 22, 2010 at 11:01:10AM -, Dave wrote:
 Hi...
 
 I was trying to disable the console screensaver, and found that in 
 sysinstall, there is no way to select none as an option.
 
 So I went and edited /etc/rc.conf to comment out the line:-
 Saver=fire (or whatever it is)
 
 I put a ; at the beginning of the line, and now FreeBSD wont come up, 
 showing an error (unexpected ;) and leaving me with a # prompt.

To comment out a line in a shell script (which is what rc.conf actually
is) you should put a '#' at the beginning of the line, not a ';'.

 
 How do I get to re-edit rc.conf, to correct the problem, as all command 
 line commands result in a not found error.
 
 Also.  What's the Correct way to disable a console screensaver?

Changing rc.conf is the Correct way. If you do it by hand or use some
other tool (like sysinstall) to do it does not really matter.
Putting  'saver=NO'  in rc.conf or not having and 'saver=' line
there will both do the same thing - not starting any screen saver.

 
 Sysinstall alows you to select and enable one, but not remove it!
 
 Bit of an oversight that I suspect

Probably. The shortcomings of sysinstall are many and varied, so one
more is not surprise.


-- 
Insert your favourite quote here.
Erik Trulsson
ertr1...@student.uu.se
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Well, I broke it! FreeBSD V8.1 release

2010-12-22 Thread Dave
On 22 Dec 2010 at 11:41, b. f. wrote:

 dave wrote:
 ...
 I was trying to disable the console screensaver, and found that in
 sysinstall, there is no way to select none as an option.
 
 So I went and edited /etc/rc.conf to comment out the line:-
 Saver=fire (or whatever it is)
 
 I put a ; at the beginning of the line, and now FreeBSD wont come up,
 showing an error (unexpected ;) and leaving me with a # prompt.
 
 How do I get to re-edit rc.conf, to correct the problem, as all
 command line commands result in a not found error.
 
 You didn't provide much information, but probably what happened is
 that your defective rc.conf caused an error when booting, and your
 normal boot aborted and dropped into single-user. This typically
 means that some partitions that are mounted by default during a normal
 boot and that contain editors and other programs are not initially
 mounted.  So probably if you did something like:
 
 fsck -p /
 mount -uw /
 swapon -a
 mount -a
 
 you could then edit /etc/rc.conf with your favorite editor. Or you
 could just use sed, ed, or vi from /rescue, or from the release media,
 to make the necessary changes, rather than attempting to mount all
 partitions.
 
 
 Also.  What's the Correct way to disable a console screensaver?
 
 Sysinstall alows you to select and enable one, but not remove it!
 
 On the fly, you can use vidcontrol -t ...
 
 To change the default setting, comment out or delete the  saver=...
 line, or change it to
 
 saver=NO
 
 which is what is originally in /etc/defaults/rc.conf.
 
 Sysinstall is only one tool you can use to install or configure the
 system.  It's not necessary, and for minor changes like this, it's not
 the method of choice.
 
 b.
 

Thank you Sir, it's back working again, with no screen saver.

Thank's also to others who responded, much apprecaited.

I'll be back later, now I can see the error messages that were hidden 
behind the saver when something burped, only becoming visible as the 
otherwise stalled machine shutdown on one short press of the power key..   
I just need to wait now for the trouble to manifest itself again.

Cheers All

Dave B.

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Well, I broke it! FreeBSD V8.1 release

2010-12-22 Thread Bruce Cran
On Wed, 22 Dec 2010 11:01:10 -
Dave d...@g8kbv.demon.co.uk wrote:

 Sysinstall alows you to select and enable one, but not remove it!
 
 Bit of an oversight that I suspect

Fixed in r216651 :)

-- 
Bruce Cran
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Well, I broke it! FreeBSD V8.1 release

2010-12-22 Thread Chris Brennan
On Wed, Dec 22, 2010 at 8:07 AM, Bruce Cran br...@cran.org.uk wrote:

 On Wed, 22 Dec 2010 11:01:10 -
 Dave d...@g8kbv.demon.co.uk wrote:

  Sysinstall alows you to select and enable one, but not remove it!
 
  Bit of an oversight that I suspect

 Fixed in r216651 :)



IIRC ';' isn't a valid bash comment ... (which has been previously discussed
elsewhere). It's usually safer to use '#' for  comment in /etc/rc.conf and
other system config files as they typically use BASH style structs.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Well, I broke it! FreeBSD V8.1 release

2010-12-22 Thread Jerry
On Wed, 22 Dec 2010 09:49:46 -0500
Chris Brennan xa...@xaerolimit.net articulated:

 On Wed, Dec 22, 2010 at 8:07 AM, Bruce Cran br...@cran.org.uk wrote:
 
  On Wed, 22 Dec 2010 11:01:10 -
  Dave d...@g8kbv.demon.co.uk wrote:
 
   Sysinstall alows you to select and enable one, but not remove it!
  
   Bit of an oversight that I suspect
 
  Fixed in r216651 :)
 
 IIRC ';' isn't a valid bash comment ... (which has been previously
 discussed elsewhere). It's usually safer to use '#' for  comment
 in /etc/rc.conf and other system config files as they typically use
 BASH style structs.

If you want to insert a really long comment block:

:  IMPORTANT

 mumble bla bla bla ...

IMPORTANT

You can pretty much put anything you want between the:
:  IMPORTANT
and
IMPORTANT

tags. You don't have to use IMPORTANT either. It works with
Bash; however, I am unsure of how it works with other shells. Unless
you have a really long comment block, I think the # syntax is easier
to use. Plus, I don't know if it would even work in an rc file.

-- 
Jerry ✌
freebsd.u...@seibercom.net

Disclaimer: off-list followups get on-list replies or get ignored.
Please do not ignore the Reply-To header.
__
When taxes are due, Americans tend to feel quite bled-white and blue.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Well, I broke it! FreeBSD V8.1 release

2010-12-22 Thread Robert Bonomi
 From owner-freebsd-questi...@freebsd.org  Wed Dec 22 05:01:28 2010
 From: Dave d...@g8kbv.demon.co.uk
 To: freebsd-questions@freebsd.org
 Date: Wed, 22 Dec 2010 11:01:10 -
 Subject: Well, I broke it!   FreeBSD V8.1 release

 Hi...

 I was trying to disable the console screensaver, and found that in 
 sysinstall, there is no way to select none as an option.

 So I went and edited /etc/rc.conf to comment out the line:-
 Saver=fire (or whatever it is)

 I put a ; at the beginning of the line, and now FreeBSD wont come up, 
 showing an error (unexpected ;) and leaving me with a # prompt.

It's rogt. you did wrong;.  Should have been a '#', not a ';'

 How do I get to re-edit rc.conf, to correct the problem, as all command 
 line commands result in a not found error.

  # fsck -p || fsck
  # mount -a
  # vi /etc/rc.conf{ or editor of your choice }
  # reboot

 Also.  What's the Correct way to disable a console screensaver?

 # vidcontrol -t off

see 'man splash'


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Well, I broke it! FreeBSD V8.1 release

2010-12-22 Thread Polytropon
On Wed, 22 Dec 2010 09:54:02 -0600 (CST), Robert Bonomi 
bon...@mail.r-bonomi.com wrote:
  From: Dave d...@g8kbv.demon.co.uk
  Also.  What's the Correct way to disable a console screensaver?
 
  # vidcontrol -t off
 
 see 'man splash'

Also see /etc/defaults/rc.conf which states:

blanktime=300 # blank time (in seconds) or NO to turn it off.
saver=NO  # screen saver: Uses /boot/kernel/${saver}_saver.ko


-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Well, I broke it! FreeBSD V8.1 release

2010-12-22 Thread Polytropon
On Wed, 22 Dec 2010 09:49:46 -0500, Chris Brennan xa...@xaerolimit.net wrote:
 On Wed, Dec 22, 2010 at 8:07 AM, Bruce Cran br...@cran.org.uk wrote:
 
  On Wed, 22 Dec 2010 11:01:10 -
  Dave d...@g8kbv.demon.co.uk wrote:
 
   Sysinstall alows you to select and enable one, but not remove it!
  
   Bit of an oversight that I suspect
 
  Fixed in r216651 :)
 
 
 
 IIRC ';' isn't a valid bash comment ... (which has been previously discussed
 elsewhere). It's usually safer to use '#' for  comment in /etc/rc.conf and
 other system config files as they typically use BASH style structs.

Putting emphasize on _BA_sh seems to be a typical Linuxism. :-)

FreeBSD's standard scripting shell is the Bourne Shell, /bin/sh.
The Bourne Again Shell, bash, isn't even part of the FreeBSD
(base) system. Only under exceptional circumstances there
will be a /bin/bash.

As it has been pointed out, /etc/rc.conf is a shell script
(or to be correct: part of a shell script) that basically
consists of variable assignments, name=value. In this
context, ; has the default meaning in sh syntax - this
refers to Bourne Shell syntax.

The ; means command separator. It is a valid syntactical
element of the sh language. A command like

; saver=NO

causes the shell to stop processing the script (which causes
the system boot to stop as it interrupts reading /etc/rc.conf,
which interrupts the start of /etc/rc). Infont of ; there
has to be a command, and in this case, nothing is there.

As the Bourne Shell is the standard scripting shell on most
UNIX systems, relying on bash specific constructs may have
impact to script portability (which may develop into an
issue if you have to create scripts that should run on many
different kinds of UNIX).

The form

:  DELIMITER
... pile ...
...  of  ...
... text ...
DELIMITER

is indirectly refered to in man sh:

The following redirection is often called a ``here-document''.

  [n] delimiter
here-doc-text
...
  delimiter

All the text on successive lines up to the delimiter is saved away and
made available to the command on standard input, or file descriptor n if
it is specified.  If the delimiter as specified on the initial line is
quoted, then the here-doc-text is treated literally, otherwise the text
is subjected to parameter expansion, command substitution, and arithmetic
expansion (as described in the section on Word Expansions).  If the oper-
ator is ``-'' instead of ``'', then leading tabs in the here-doc-text
are stripped.

//

The option of specifying : as a file descriptor works with
the standard /bin/sh of FreeBSD, but I'm not sure this should
be encouraged for use in configuration files like /etc/rc.conf.

Using the form

# blah

is also better for use with syntax highlighting as comments
can be determined more easily, whereas the form using the here-doc
is primarily a here-doc and NOT a comment (unless directed
toward :).

From man sh:

The character `#' introduces a comment if used at the beginning of a
word.  The word starting with `#' and the rest of the line are ignored.

//

The use of # also makes sure there is NO kind of variable
expansion or arithmetic operation done - which you could
achieve using

:  'DELIMITER'
... pile ...
...  of  ...
... text ...
$((the)) $USER `/bin/laden` ${causes `NO' touble here!
'DELIMITER'

but # is the really safe form, as you can write ANYTHING
behind it. Again, the form illustrated above could cause
some interpretation problems for syntax highlighting
algorithms.

See man rc.conf for details. :-)



-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Well, I broke it! FreeBSD V8.1 release

2010-12-22 Thread Jason Helfman

On Wed, Dec 22, 2010 at 09:49:46AM -0500, Chris Brennan thus spake:

On Wed, Dec 22, 2010 at 8:07 AM, Bruce Cran br...@cran.org.uk wrote:


On Wed, 22 Dec 2010 11:01:10 -
Dave d...@g8kbv.demon.co.uk wrote:

 Sysinstall alows you to select and enable one, but not remove it!

 Bit of an oversight that I suspect

Fixed in r216651 :)




IIRC ';' isn't a valid bash comment ... (which has been previously discussed
elsewhere). It's usually safer to use '#' for  comment in /etc/rc.conf and
other system config files as they typically use BASH style structs.


IMHO...
It seems that /etc/rc.conf is in need of a sytax check script. Something
similiar to visudo for editing /usr/local/etc/sudoers.

-jgh
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Well, I broke it! FreeBSD V8.1 release

2010-12-22 Thread Rob Farmer
On Wed, Dec 22, 2010 at 12:45, Jason Helfman jhelf...@e-e.com wrote:
 IMHO...
 It seems that /etc/rc.conf is in need of a sytax check script. Something
 similiar to visudo for editing /usr/local/etc/sudoers.


Just run it with /bin/sh. If no errors appear the syntax is good. Or
you can use /bin/sh -x to see more detail.

-- 
Rob Farmer
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Well, I broke it! FreeBSD V8.1 release

2010-12-22 Thread Lowell Gilbert
Jason Helfman jhelf...@e-e.com writes:

 On Wed, Dec 22, 2010 at 09:49:46AM -0500, Chris Brennan thus spake:
On Wed, Dec 22, 2010 at 8:07 AM, Bruce Cran br...@cran.org.uk wrote:

 On Wed, 22 Dec 2010 11:01:10 -
 Dave d...@g8kbv.demon.co.uk wrote:

  Sysinstall alows you to select and enable one, but not remove it!
 
  Bit of an oversight that I suspect

 Fixed in r216651 :)



IIRC ';' isn't a valid bash comment ... (which has been previously discussed
elsewhere). It's usually safer to use '#' for  comment in /etc/rc.conf and
other system config files as they typically use BASH style structs.

 IMHO...
 It seems that /etc/rc.conf is in need of a sytax check script. Something
 similiar to visudo for editing /usr/local/etc/sudoers.

Well, rc.conf isn't supposed to have anything but variable settings, so
for syntax alone, /bin/sh /etc/rc.conf is a perfectly fine test.  If
you want to check semantics as well, things get complicated very quickly.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Well, I broke it! FreeBSD V8.1 release

2010-12-22 Thread Adam Vande More
On Wed, Dec 22, 2010 at 3:08 PM, Lowell Gilbert 
freebsd-questions-lo...@be-well.ilk.org wrote:

 Well, rc.conf isn't supposed to have anything but variable settings, so
 for syntax alone, /bin/sh /etc/rc.conf is a perfectly fine test.  If
 you want to check semantics as well, things get complicated very quickly.


rcorder(8) is a good starting point for basic semantic checking.

-- 
Adam Vande More
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org