]> git.pld-linux.org Git - projects/rc-scripts.git/commitdiff
- version 0.2.11
authorJan Rękorajski <baggins@pld-linux.org>
Sun, 13 May 2001 17:10:19 +0000 (17:10 +0000)
committerJan Rękorajski <baggins@pld-linux.org>
Sun, 13 May 2001 17:10:19 +0000 (17:10 +0000)
- true ksh support/fixes:
- fixed numerous instances of incorrect quoting ("" inside itself)
- s/local/typeset/

svn-id: @883

configure.in
rc.d/init.d/functions
rc.d/init.d/functions.network
rc.d/init.d/timezone
rc.d/rc
rc.d/rc.shutdown
rc.d/rc.sysinit
sysconfig/network-scripts/ifup

index 6a7ea77759b94ffac3e4c39fb44e9b1fe1fdbd85..9033b38550ce36e50cd6c0cf56d5bb27a1f1233b 100644 (file)
@@ -1,8 +1,8 @@
-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                     \
index b230f58ef902140a9a5371b3217d8ea77da377b6..566d2ca251bfc7ffd59ddf46e9eeb447ed6e8925 100644 (file)
@@ -1,7 +1,7 @@
 # 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
@@ -51,7 +51,7 @@ termput()
 # printf equivalent
 printf_()
 {
-       local text m
+       typeset text m
        text="$1" ;
        shift ;
        if [ $# -gt 0 ]; then
@@ -68,7 +68,7 @@ printf_()
 # 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
@@ -144,7 +144,7 @@ msg_usage()
 # 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 \".\" }"
@@ -156,7 +156,7 @@ show()
 # 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)"
@@ -201,7 +201,7 @@ deltext()
 # 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
@@ -228,7 +228,7 @@ run_cmd()
 # 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
@@ -276,7 +276,7 @@ daemon()
 # 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]"
@@ -356,7 +356,7 @@ killproc()
 # A function to find the pid of a program.
 pidofproc() 
 {
-       local pid
+       typeset pid
        # Test syntax.
        if [ $# = 0 ] ; then
                msg_usage " pidofproc {program}"
@@ -432,7 +432,7 @@ status()
 
 # 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
@@ -509,7 +509,7 @@ is_module()
 
 _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
index d4534448743e3a5e2eec4d502b51bf36562f0ad8..bff45ac50b7188971503aa1f668fadec49167666 100755 (executable)
@@ -1,5 +1,5 @@
 #
-# $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.
@@ -114,7 +114,7 @@ fi
 
 set_hostname()
 {
-local hostname domain
+typeset hostname domain
 hostname=$(echo $1 | awk ' { gsub(/\..*$/,NIL); print $0; } ')
 domain=$(echo $1 | awk ' { sub(/^[^\.]*\./,NIL); print $0; } ')
 
@@ -199,7 +199,7 @@ if [ -n "$VARD" -a -e /proc/sys/net/$WHAT ]; then
                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
@@ -210,7 +210,7 @@ if [ -n "$VARD" -a -e /proc/sys/net/$WHAT ]; then
                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
@@ -364,7 +364,7 @@ fi
 # (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
@@ -405,7 +405,7 @@ return
 # (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
index 2c554cd7270bc38be4ec7a2e57b6c75cc81d8b69..d18d30f7f8bdcc1555e93783404cd9d5ab9acba6 100644 (file)
@@ -5,7 +5,7 @@
 # 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"
@@ -36,9 +36,9 @@ case "$1" in
         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=$?
diff --git a/rc.d/rc b/rc.d/rc
index 3dde45cdd167136451408b5ca16a1437df2a2619..91b13282bcdecaac48b06c34f35532288e874328 100755 (executable)
--- a/rc.d/rc
+++ b/rc.d/rc
@@ -5,7 +5,7 @@
 #               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>
@@ -90,9 +90,9 @@ stty onlcr -ixon 0>&1
 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}"
@@ -176,8 +176,8 @@ else
 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}"
index 0c55ee42828b6eef433091eda839eabb35e2f1ab..073924cb62c052164207f6bf5c5021f9d6acc411 100755 (executable)
@@ -6,7 +6,7 @@
 #               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
@@ -72,7 +72,7 @@ if [ -x /sbin/raidstop -a -f /etc/raidtab ]; then
        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
index 03224ecf8d88dd759c4df931ae1f668ab06753c4..073e0fb69edafac31415f7f3ebaf75519326d455 100755 (executable)
@@ -1,7 +1,7 @@
 #!/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>
@@ -55,7 +55,7 @@ fi
 # 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
@@ -150,14 +150,14 @@ else
 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
@@ -193,7 +193,7 @@ if awk '{ if ($2 ~ /^\/$/ && ( $3 ~ /^(nfs|romfs)$/ || $6 ~ /^0$/ ) ) exit 1 ; e
                    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
@@ -367,7 +367,7 @@ if [ -f /proc/mdstat -a -f /etc/raidtab ]; then
                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
@@ -396,7 +396,7 @@ if [ ! -f /fastboot ]; then
                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
@@ -449,7 +449,7 @@ if grep -q "encryption=" /etc/fstab; then
                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
@@ -488,7 +488,7 @@ if [ -f /etc/rc.d/rc.serial ]; then
 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
 
index d57f366afc490649fae44b1a628a54c5f2a23070..ed022309989bf8344cee225198a54c684a13591f 100755 (executable)
@@ -1,6 +1,6 @@
 #!/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
 
@@ -132,7 +132,7 @@ fi
 
 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."
This page took 0.104195 seconds and 4 git commands to generate.