Kolejna ³ata.
Marcin Dalecki
dalecki w cs.net.pl
Nie, 21 Lut 1999, 21:41:03 CET
Klejna drobna korrekta. Otó¿ dalece nie ka¿da wersja programu echo
interpretuje poprawnie sekwencjê escape \e. Có¿ to za problem jednak
wstawiæ zamiast tego po prostu \033?
--Marcin
-------------- nastêpna czê¶æ ---------
diff -ur rc.d-orig/init.d/functions rc.d/init.d/functions
--- rc.d-orig/init.d/functions Tue Feb 2 19:08:03 1999
+++ rc.d/init.d/functions Sun Feb 21 21:31:34 1999
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/ksh
#
# functions This file contains functions to be used by most or all
# shell scripts in the /etc/init.d directory.
@@ -11,31 +11,31 @@
#
# First set up a default search path.
-export PATH="/sbin:/usr/sbin:/bin:/usr/bin"
+PATH="/sbin:/usr/sbin:/bin:/usr/bin"; export PATH
# Some functions to handle PLD-style messages
-function show() {
+function show {
text="$*".............................................
echo -ne `echo $text | cut -c1-45`
}
-function busy() {
- echo -ne '\e[0;36m[\e[0;35m BUSY \e[0;36m]\e[0;37m'
+function busy {
+ echo -ne '\033[0;36m[\033[0;35m BUSY \033[0;36m]\033[0;37m'
}
-function ok() {
- echo -e '\e[0;36m[\e[0;32m DONE \e[0;36m]\e[0;37m'
+function ok {
+ echo -e '\033[0;36m[\033[0;32m DONE \033[0;36m]\033[0;37m'
}
-function fail() {
- echo -e '\e[0;36m[\e[0;31m FAIL \e[0;36m]\e[0;37m'
+function fail {
+ echo -e '\033[0;36m[\033[0;31m FAIL \033[0;36m]\033[0;37m'
}
-function died() {
- echo -e '\e[0;36m[\e[0;31m DIED \e[0;36m]\e[0;37m'
+function died {
+ echo -e '\033[0;36m[\033[0;31m DIED \033[0;36m]\033[0;37m'
}
-function deltext() {
+function deltext {
echo -ne '\b\b\b\b\b\b\b\b'
}
diff -ur rc.d-orig/init.d/functions-ip6 rc.d/init.d/functions-ip6
--- rc.d-orig/init.d/functions-ip6 Mon Dec 7 19:45:18 1998
+++ rc.d/init.d/functions-ip6 Sun Feb 21 20:23:08 1999
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/ksh
#
#!F:functions-ip6
#
diff -ur rc.d-orig/init.d/halt rc.d/init.d/halt
--- rc.d-orig/init.d/halt Mon Dec 7 19:54:15 1998
+++ rc.d/init.d/halt Sun Feb 21 20:23:20 1999
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/ksh
#
# rc.halt This file is executed by init when it goes into runlevel
# 0 (halt) or runlevel 6 (reboot). It kills all processes,
diff -ur rc.d-orig/init.d/killall rc.d/init.d/killall
--- rc.d-orig/init.d/killall Mon Dec 7 19:54:03 1998
+++ rc.d/init.d/killall Sun Feb 21 20:24:16 1999
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/ksh
# Bring down all unneeded services that are still running (there shouldn't
# be any, so this is just a sanity check)
diff -ur rc.d-orig/init.d/network rc.d/init.d/network
--- rc.d-orig/init.d/network Tue Feb 2 19:15:29 1999
+++ rc.d/init.d/network Sun Feb 21 20:41:28 1999
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/ksh
#
# network Bring up/down networking
#
@@ -25,13 +25,13 @@
fi
# Check that networking is up.
-[ ${NETWORKING} = "no" ] && exit 0
+[ "${NETWORKING}" = "no" ] && exit 0
[ -x /sbin/ifconfig ] || exit 0
# Load IPv6 module
-if [ ${IP6NETWORKING} = "yes" ]; then
+if [ "${IP6NETWORKING}" = "yes" ]; then
if [ -r /lib/modules/`uname -r`/ipv6/ipv6.o ]; then
/sbin/modprobe net-pf-10
fi
diff -ur rc.d-orig/init.d/nfsfs rc.d/init.d/nfsfs
--- rc.d-orig/init.d/nfsfs Tue Feb 2 19:50:11 1999
+++ rc.d/init.d/nfsfs Sun Feb 21 20:45:42 1999
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/ksh
#
# nfsfs Mount NFS filesystems.
#
@@ -21,7 +21,7 @@
. /etc/sysconfig/network
# Check that networking is up.
-[ ${NETWORKING} = "no" ] && exit 0
+[ "${NETWORKING}" = "no" ] && exit 0
case `uname -r` in
0.*|1.*|2.0.*)
diff -ur rc.d-orig/init.d/random rc.d/init.d/random
--- rc.d-orig/init.d/random Tue Feb 2 19:36:42 1999
+++ rc.d/init.d/random Sun Feb 21 20:26:10 1999
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/ksh
#
# random Script to snapshot random state and reload it at boot time.
#
diff -ur rc.d-orig/init.d/single rc.d/init.d/single
--- rc.d-orig/init.d/single Tue Feb 2 19:13:06 1999
+++ rc.d/init.d/single Sun Feb 21 20:25:45 1999
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/ksh
#
#
# rc.single This file is executed by init when it goes into runlevel
diff -ur rc.d-orig/rc rc.d/rc
--- rc.d-orig/rc Tue Jun 2 19:59:02 1998
+++ rc.d/rc Sun Feb 21 20:26:30 1999
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/ksh
#
# rc This file is responsible for starting/stopping
# services when the runlevel changes. It is also
diff -ur rc.d-orig/rc.sysinit rc.d/rc.sysinit
--- rc.d-orig/rc.sysinit Sun Feb 21 20:49:12 1999
+++ rc.d/rc.sysinit Sun Feb 21 20:43:22 1999
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/ksh
#
# /etc/rc.d/rc.sysinit - run once at boot time
#
@@ -245,11 +245,11 @@
CLOCK=/sbin/clock
fi
-if [ $UTC = "true" ]; then
+if [ "$UTC" = "true" ]; then
CLOCKFLAGS="$CLOCKFLAGS -u";
echo -n " (utc)"
fi
-if [ $ARC = "true" ]; then
+if [ "$ARC" = "true" ]; then
CLOCKFLAGS="$CLOCKFLAGS -A";
echo -n " (arc)"
fi
Więcej informacji o liście dyskusyjnej pld-devel-pl