DaemonForums  

Go Back   DaemonForums > FreeBSD > FreeBSD General

FreeBSD General Other questions regarding FreeBSD which do not fit in any of the categories below.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 14th December 2010
derf derf is offline
Real Name: Fred Jansen
New User
 
Join Date: Dec 2010
Location: Almere, The Netherlands
Posts: 2
Default shutdown message

dear all

am seeking the file that generates the final message on CRT after shutdown -h now.
The current final message is instructing for pushing the "enter" key but instead i would like to change this to "please power off/on the PC front button".
FreeBSD revision is 5.4

Thanks,
Reply With Quote
  #2   (View Single Post)  
Old 14th December 2010
Carpetsmoker's Avatar
Carpetsmoker Carpetsmoker is offline
Real Name: Martin
Tcpdump Spy
 
Join Date: Apr 2008
Location: Netherlands
Posts: 2,243
Default

This is on FreeBSD 7

Code:
[/usr/src]% find . -type f -exec grep -EHi --color 'reboot.*\\n' {} \;
./cddl/contrib/opensolaris/cmd/dtrace/dtrace.c:         error("run update_drv(1M) or reboot to enable changes\n");
./sbin/fsck_ffs/main.c:                 printf("\n***** REBOOT NOW *****\n");
./sys/boot/common/panic.c:      printf("--> Press a key on the console to reboot <--\n");
./sys/boot/common/panic.c:      printf("Rebooting...\n");
./sys/boot/i386/loader/main.c:    printf("Rebooting...\n");
./sys/boot/pc98/cdboot/cdboot.s:msg_keypress:   .asciz "\r\nPress any key to reboot\r\n"
./sys/boot/pc98/loader/main.c:    printf("Rebooting...\n");
./sys/boot/sparc64/loader/main.c:       printf("Rebooting...\n");
./sys/dev/acpica/acpi_timer.c:    device_printf(acpi_timer_dev, "timer test in progress, reboot to quit.\n");
./sys/dev/dpt/dpt_scsi.c:                               printf("dpt%d: HBA rebooted.\n"
./sys/dev/ixgbe/ixgbe.c:                            "Please Reboot!!\n");
./sys/dev/mpt/mpt_cam.c:                    "effect until next reboot or IOC reset\n");
./sys/dev/mxge/if_mxge.c:               device_printf(sc->dev, "NIC rebooted, status = 0x%x\n",
./sys/dev/mxge/if_mxge.c:                             "NIC did not reboot, not resetting\n");
./sys/i4b/layer1/ihfc/i4b_ihfc_pnp.c:                                   "Please hard reboot your computer!\n",
./sys/i4b/layer1/ihfc/i4b_ihfc_pnp.c:   "A hard reboot may help!\n", unit);
./sys/kern/kern_shutdown.c:             printf("Please press any key to reboot.\n\n");
./sys/kern/kern_shutdown.c:             printf("--> Press a key on the console to reboot,\n");
./sys/kern/kern_shutdown.c:     printf("Rebooting...\n");
./usr.sbin/cron/lib/entry.c:                    Debug(DPARS, ("load_entry()...reboot shortcut\n"))
./usr.sbin/sysinstall/config.c:                      "the user intends to install themselves before rebooting\n"
./usr.sbin/sysinstall/config.c:          "reboot, or to enable xdm.  The default ttys file enables normal\n"
./usr.sbin/sysinstall/installUpgrade.c:                       "way that this upgrade process works, you will have to reboot\n"
./usr.sbin/sysinstall/main.c:       || !msgNoYes("Are you sure you wish to exit?  The system will reboot\n"
./usr.sbin/sysinstall/menus.c:    "installation.  If this is not the case then you should reboot\n"
As a piece of trivia, I also discovered that the function in shutdown.c that actually shuts down the system is called die_you_gravy_sucking_pig_dog() ...
__________________
UNIX was not designed to stop you from doing stupid things, because that would also stop you from doing clever things.
Reply With Quote
  #3   (View Single Post)  
Old 14th December 2010
derf derf is offline
Real Name: Fred Jansen
New User
 
Join Date: Dec 2010
Location: Almere, The Netherlands
Posts: 2
Default

Thanks Martin but unfortunately this directory does not match what I have, the /sys directory does even not exist.I have been trying to find the kern_shutdown.c file but no luck.
Any other smart idea?
Reply With Quote
  #4   (View Single Post)  
Old 14th December 2010
roddierod's Avatar
roddierod roddierod is offline
Real Name: Rod Person
VPN Cryptographer
 
Join Date: Apr 2008
Location: Pittsburgh, Pa
Posts: 437
Default

You have to install the source code to get the source code in /sys...otherwise it blank.
__________________
"The basic tool for the manipulation of reality is the manipulation of words. If you can control the meaning of words, you can control the people who must use the words." -Philip K. Dick
Reply With Quote
  #5   (View Single Post)  
Old 14th December 2010
Carpetsmoker's Avatar
Carpetsmoker Carpetsmoker is offline
Real Name: Martin
Tcpdump Spy
 
Join Date: Apr 2008
Location: Netherlands
Posts: 2,243
Default

/sys/ is a symlink to /usr/src/sys/, I've had some occasions where it took off and went on a holiday, so make sure to check /usr/src/

It /usr/src doesn't exist or is empty, then you will need to fetch the source as roddierod mentioned.
The easiest way to do that is CVSup, see the corresponding chapter in the FreeBSD handbook for more info:
http://www.freebsd.org/doc/en_US.ISO...ook/cvsup.html
__________________
UNIX was not designed to stop you from doing stupid things, because that would also stop you from doing clever things.
Reply With Quote
  #6   (View Single Post)  
Old 14th December 2010
DutchDaemon's Avatar
DutchDaemon DutchDaemon is offline
Real Name: Ben
Spam Refugee
 
Join Date: Jul 2008
Location: Rotterdam, The Netherlands
Posts: 336
Default

Maybe I'm obtuse, but
Code:
shutdown -p now
not available/working?
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
openbsd shutdown phill OpenBSD General 3 27th October 2009 12:27 PM
shutdown message Mr-Biscuit FreeBSD General 1 16th November 2008 11:59 PM
strange behaviour after improper shutdown karri FreeBSD General 1 15th October 2008 03:08 PM
Shutdown problems radtek FreeBSD General 11 13th September 2008 12:42 AM
Polkit Shutdown for XFCE in Freebsd 7.0 shep FreeBSD General 1 18th May 2008 12:24 AM


All times are GMT. The time now is 09:27 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick