Parent Directory
|
Revision Log
init scripts and their extra options can now have descriptions, #184327.
| 1 | #!/sbin/runscript |
| 2 | # Copyright 1999-2007 Gentoo Foundation |
| 3 | # Distributed under the terms of the GNU General Public License v2 |
| 4 | |
| 5 | description="Sets the hostname of the machine." |
| 6 | |
| 7 | depend() { |
| 8 | need checkroot |
| 9 | } |
| 10 | |
| 11 | start() { |
| 12 | if [ -f /etc/hostname ] ; then |
| 13 | ewarn "You should stop using /etc/hostname and use /etc/conf.d/hostname" |
| 14 | HOSTNAME=$(cat /etc/hostname) |
| 15 | fi |
| 16 | |
| 17 | ebegin "Setting hostname to ${HOSTNAME}" |
| 18 | hostname "${HOSTNAME}" |
| 19 | eend $? "Failed to set the hostname" |
| 20 | } |
| 21 | |
| 22 | # vim: set ts=4 : |
| Name | Value |
|---|---|
| svn:executable | * |
| ViewVC Help | |
| Powered by ViewVC 1.1.13 |