-dnl $Id: configure.in,v 1.37 2000/12/12 17:38:17 kloczek Exp $
+dnl $Id: configure.in,v 1.38 2001/05/13 17:10:14 baggins Exp $
AC_INIT()
PACKAGE=rc-scripts
-VERSION=0.2.10
+VERSION=0.2.11
ALL_LINGUAS="pl de"
SHSCRIPTS="rc.d/rc \
# functions This file contains functions to be used by most or all
# shell scripts in the /etc/init.d directory.
#
-# $Id: functions,v 1.62 2000/12/14 09:49:25 jajcus Exp $
+# $Id: functions,v 1.63 2001/05/13 17:10:17 baggins Exp $
#
# Author: Miquel van Smoorenburg, <miquels@drinkel.nl.mugnet.org>
# Hacked by: Greg Galloway and Marc Ewing
# printf equivalent
printf_()
{
- local text m
+ typeset text m
text="$1" ;
shift ;
if [ $# -gt 0 ]; then
# National language support function
nls()
{
- local msg_echo old_nls_domain text message
+ typeset msg_echo old_nls_domain text message
msg_echo='\n'
old_nls_domain="$NLS_DOMAIN"
# parse command line
# Some functions to handle PLD-style messages
show()
{
- local text
+ typeset text
text=$(nls "$@")
echo -n "$text"
awk "BEGIN { for (j=length(\"$text\"); j<$INIT_COL; j++) printf \".\" }"
# used).
progress()
{
- local COLOR
+ typeset COLOR
if [ -n "$2" ]; then COLOR="$2"; else COLOR="2"; fi
deltext
echo -n "$(termput setaf 6)[$(termput setaf "$COLOR") $(nls --nls-domain rc-scripts "$1") $(termput setaf 6)]$(termput op)"
# Usage run_cmd Message command_to_run
run_cmd()
{
- local exit_code errors message force_err
+ typeset exit_code errors message force_err
typeset -i force_err=0
typeset -i exit_code=0
case "$1" in
# A function to start a program (now it's usefull on read-only filesystem too)
daemon()
{
- local nicelevel exit_code errors prog
+ typeset nicelevel exit_code errors prog
typeset -i nicelevel=0
typeset -i exit_code=0
[ -z "$DEFAULT_SERVICE_RUN_NICE_LEVEL" ] && DEFAULT_SERVICE_RUN_NICE_LEVEL=0
# A function to stop a program.
killproc()
{
- local notset killlevel base pid
+ typeset notset killlevel base pid
# Test syntax.
if [ $# = 0 ]; then
msg_usage " killproc {program} [signal]"
# A function to find the pid of a program.
pidofproc()
{
- local pid
+ typeset pid
# Test syntax.
if [ $# = 0 ] ; then
msg_usage " pidofproc {program}"
# Confirm whether we really want to run this service
confirm() {
- local answer
+ typeset answer
nls -n "Start service %s (Y)es/(N)o/(C)ontinue? [Y] " "$1"
read answer
case $answer in
_modprobe()
{
- local parsed single die args foo result
+ typeset parsed single die args foo result
parsed=no
while is_no "$parsed" ; do
case "$1" in
#
-# $Id: functions.network,v 1.46 2000/11/16 15:58:54 baggins Exp $
+# $Id: functions.network,v 1.47 2001/05/13 17:10:17 baggins Exp $
#
# This is not a shell script; it provides functions to network scripts
# that source it.
set_hostname()
{
-local hostname domain
+typeset hostname domain
hostname=$(echo $1 | awk ' { gsub(/\..*$/,NIL); print $0; } ')
domain=$(echo $1 | awk ' { sub(/^[^\.]*\./,NIL); print $0; } ')
is_no "$VARD" && [ "$SET" = "1" ] && SET="$(($SET - 1))"
is_yes "$VARD" && [ "$SET" = "0" ] && SET="$(($SET + 1))"
if [ -n "$MESSAGE" ]; then
- show "`nls "Setting %s to %s" "$MESSAGE" "$SET"`"; busy
+ show "`nls 'Setting %s to %s' "$MESSAGE" "$SET"`"; busy
if (echo "$SET" > /proc/sys/net/$WHAT) 2> /dev/null; then
deltext; ok
else
fi
elif [ "$TODO" = "stop" ]; then
if [ -n "$MESSAGE" ]; then
- show "`nls "Setting %s to %s" "$MESSAGE" "$DEF"`"; busy
+ show "`nls 'Setting %s to %s' "$MESSAGE" "$DEF"`"; busy
if (echo "$DEF" > /proc/sys/net/$WHAT) 2> /dev/null; then
deltext; ok
else
# (c) 1999 Grzegorz Stanislawski <stangrze@open.net.pl>
#
calcprefix() {
-local OISF len olen bad prefix
+typeset OISF len olen bad prefix
OISF=$IFS
IFS="."
prefix=0
# (c) 1999 Grzegorz Stanislawski <stangrze@open.net.pl>
#
calcnetmask() {
-local prefix a MASK
+typeset prefix a MASK
MASK=""
if [ "`echo "${1}" | grep "^[0-9]"`" = "" ]; then
prefix=32
# description: This script is setting time zone information for your machine.
# Author: Pawel Wilk <siefca@pld.org.pl>
#
-# $Id: timezone,v 1.7 2001/03/03 11:28:11 laro Exp $
+# $Id: timezone,v 1.8 2001/05/13 17:10:17 baggins Exp $
# NLS
NLS_DOMAIN="rc-scripts"
rm -f /etc/localtime
if [ -f "$ZONE_FILE" ]; then
if [ -n "$ZONE_INFO_AREA" ]; then
- MESSAGE="`nls "Setting time zone information (%s, %s)" "$ZONE_INFO_AREA" "$TIME_ZONE"`"
+ MESSAGE="`nls 'Setting time zone information (%s, %s)' "$ZONE_INFO_AREA" "$TIME_ZONE"`"
else
- MESSAGE="`nls "Setting time zone information (%s)" "$TIME_ZONE"`"
+ MESSAGE="`nls 'Setting time zone information (%s)' "$TIME_ZONE"`"
fi
run_cmd "$MESSAGE" ln -s $ZONE_FILE /etc/localtime
RETVAL=$?
# responsible for the very first setup of basic
# things, such as setting the hostname.
#
-# $Id: rc,v 1.26 2000/11/16 16:01:17 baggins Exp $
+# $Id: rc,v 1.27 2001/05/13 17:10:16 baggins Exp $
#
# Original Author:
# Miquel van Smoorenburg, <miquels@drinkel.nl.mugnet.org>
af2="`termput setaf 2`"
af6="`termput setaf 6`"
af7="`termput setaf 7`"
-text="`nls "%sResource Manager: %sEntering runlevel number" "$af2" "$af7"`"
-text_size="`nls "%sResource Manager: %sEntering runlevel number" "" ""`"
-resp_size="`nls "DONE"`"
+text="`nls '%sResource Manager: %sEntering runlevel number' "$af2" "$af7"`"
+text_size="`nls '%sResource Manager: %sEntering runlevel number' "" ""`"
+resp_size="`nls 'DONE'`"
echo -n "$text"
awk "BEGIN { for (j=length(\"$text_size\"); j<$INIT_COL+${#resp_size}-${#runlevel}; j++) printf \".\" }"
echo "${af6}[${af2} $runlevel ${af6}]${af7}"
fi
# Say something ;)
-text="`nls "%sResource Manager: %sRunlevel has been reached" "$af2" "$af7"`"
-text_size="`nls "%sResource Manager: %sRunlevel has been reached" "" ""`"
+text="`nls '%sResource Manager: %sRunlevel has been reached' "$af2" "$af7"`"
+text_size="`nls '%sResource Manager: %sRunlevel has been reached' "" ""`"
echo -n "$text"
awk "BEGIN { for (j=length(\"$text_size\"); j<$INIT_COL+${#resp_size}-${#runlevel}; j++) printf \".\" }"
echo "${af6}[${af2} $runlevel ${af6}]${af7}"
# Modified for PLD Linux by Grzegorz Stanislawski
# Changes: Arkadiusz Mi¶kiewicz <misiek@pld.org.pl>
#
-# $Id: rc.shutdown,v 1.13 2000/11/16 16:01:17 baggins Exp $
+# $Id: rc.shutdown,v 1.14 2001/05/13 17:10:16 baggins Exp $
# Set the path.
PATH=/sbin:/bin:/usr/bin:/usr/sbin
if [ -f /proc/mdstat ] ; then
mddevs=$(awk '/^md.* active/ {print $1}' /proc/mdstat)
for mddev in $mddevs ; do
- MESSAGE="`nls "Turning off RAID for %s" "$mddev"`"
+ MESSAGE="`nls 'Turning off RAID for %s' "$mddev"`"
run_cmd "$MESSAGE" raidstop /dev/$mddev
done
unset mddev mddevs
#!/bin/sh
#
# /etc/rc.d/rc.sysinit - run once at boot time
-# $Id: rc.sysinit,v 1.76 2001/04/20 23:28:31 zagrodzki Exp $
+# $Id: rc.sysinit,v 1.77 2001/05/13 17:10:16 baggins Exp $
#
# Taken in part from Miquel van Smoorenburg's bcheckrc.
# Changes: Arkadiusz Mi¶kiewicz <misiek@pld.org.pl>
# Print welcome message
echo -e "\t\t\t`termput setaf 6`Powered by `termput setaf 2`PLD GNU/Linux`termput setaf 7`"
if is_yes "$PROMPT"; then
- echo -en "\t\t`nls "Press"` '`termput setaf 1`I`termput setaf 7`' `nls "to enter interactive startup."`"
+ echo -en "\t\t`nls 'Press'` '`termput setaf 1`I`termput setaf 7`' `nls 'to enter interactive startup.'`"
echo
sleep 1
fi
fi
# Start up swapping.
-run_cmd "`nls "Activating swap partitions"`" swapon -a
+run_cmd "`nls 'Activating swap partitions'`" swapon -a
# Set the hostname.
-run_cmd "`nls "Host:"` ${HOSTNAME}" hostname ${HOSTNAME}
+run_cmd "`nls 'Host:'` ${HOSTNAME}" hostname ${HOSTNAME}
# Set the NIS domain name
if [ -n "$NISDOMAIN" ]; then
- run_cmd "`nls "NIS Domain:"` ${NISDOMAIN}" domainname $NISDOMAIN
+ run_cmd "`nls 'NIS Domain:'` ${NISDOMAIN}" domainname $NISDOMAIN
else
domainname ""
fi
nls "*** when you leave the shell."
echo
- PS1="`nls "(Repair filesystem)# "`"; export PS1
+ PS1="`nls '(Repair filesystem)# '`"; export PS1
if is_yes "$RUN_SULOGIN_ON_ERR"; then
sulogin
else
nls "*** when you leave the shell."
echo
- PS1="`nls "(RAID Repair)# "`"; export PS1
+ PS1="`nls '(RAID Repair)# '`"; export PS1
if is_yes "$RUN_SULOGIN_ON_ERR"; then
sulogin
else
nls "*** when you leave the shell."
echo
- PS1="`nls "(Repair filesystem)# "`"; export PS1
+ PS1="`nls '(Repair filesystem)# '`"; export PS1
if is_yes "$RUN_SULOGIN_ON_ERR"; then
sulogin
else
nls "*** when you leave the shell."
echo
- PS1="`nls "(Repair filesystem)# "`"; export PS1
+ PS1="`nls '(Repair filesystem)# '`"; export PS1
if is_yes "$RUN_SULOGIN_ON_ERR"; then
sulogin
else
fi
if [ -f /proc/sys/kernel/panic -a "$PANIC_REBOOT_TIME" -gt "0" ]; then
- show "`nls "Setting %s seconds for kernel reboot after panic." "$PANIC_REBOOT_TIME"`"; busy
+ show "`nls 'Setting %s seconds for kernel reboot after panic.' "$PANIC_REBOOT_TIME"`"; busy
if (echo $PANIC_REBOOT_TIME > /proc/sys/kernel/panic); then ok; else fail; fi
fi
#!/bin/sh
#
-# $Id: ifup,v 1.54 2001/04/19 23:31:48 misiek Exp $
+# $Id: ifup,v 1.55 2001/05/13 17:10:19 baggins Exp $
#
PATH=/sbin:/usr/sbin:/bin:/usr/bin
if [ -n "$DYNIP" -a "$ISALIAS" = "no" ]; then
- echo -n "`nls "Determining IP information for %s" $FULLDEVNAME...`"
+ echo -n "`nls 'Determining IP information for %s' $FULLDEVNAME'...'`"
if [ "$DYNIP" = "pump" ]; then
if /sbin/pump -i $FULLDEVNAME ; then
nls " done."