[Initng-svn] r1989 - initng/initfiles/system
svn at initng.thinktux.net
svn at initng.thinktux.net
Tue Nov 8 00:57:04 CET 2005
Author: jimmy
Date: Tue Nov 8 00:57:03 2005
New Revision: 1989
Modified:
initng/initfiles/system/discover.ii
initng/initfiles/system/domainname.ii
initng/initfiles/system/dotnet.ii
initng/initfiles/system/firestarter.ii
initng/initfiles/system/guarddog.ii
initng/initfiles/system/hdparm.ii
initng/initfiles/system/hostname.ii
Log:
More system scripts converted.
Modified: initng/initfiles/system/discover.ii
==============================================================================
--- initng/initfiles/system/discover.ii (original)
+++ initng/initfiles/system/discover.ii Tue Nov 8 00:57:03 2005
@@ -1,7 +1,5 @@
service system/discover {
need = system/initial system/mountroot system/modules
- start {
- test -x /sbin/discover-modprobe || exit 0
- discover-modprobe -v
- }
+ start = @discover-modprobe@
+ start_args = -v
}
Modified: initng/initfiles/system/domainname.ii
==============================================================================
--- initng/initfiles/system/domainname.ii (original)
+++ initng/initfiles/system/domainname.ii Tue Nov 8 00:57:03 2005
@@ -10,7 +10,7 @@
checkconfig_nis() {
if [[ -f /etc/nisdomainname ]] ; then
- echo "You should stop using /etc/nisdomainname and use /etc/conf.d/domainname"
+ @echo@ "You should stop using /etc/nisdomainname and use /etc/conf.d/domainname"
export NISDOMAIN=$(</etc/nisdomainname)
return 0
fi
@@ -19,13 +19,13 @@
checkconfig_dns() {
if [[ -f /etc/dnsdomainname ]] ; then
- echo "You should stop using /etc/dnsdomainname and use /etc/conf.d/domainname"
+ @echo@ "You should stop using /etc/dnsdomainname and use /etc/conf.d/domainname"
export DNSDOMAIN=$(</etc/dnsdomainname)
fi
[[ -z ${DNSDOMAIN} ]] && return 1
if ! touch /etc/resolv.conf 2> /dev/null ; then
- echo "Unable to set domain in resolv.conf (ro root?)"
+ @echo@ "Unable to set domain in resolv.conf (ro root?)"
return 1
else
return 0
@@ -36,18 +36,18 @@
retval2=0
if checkconfig_nis ; then
- echo "Setting NIS domainname to ${NISDOMAIN} ..."
- /bin/domainname "${NISDOMAIN}"
+ @echo@ "Setting NIS domainname to ${NISDOMAIN} ..."
+ @/bin/domainname@ "${NISDOMAIN}"
retval=$?
fi
if checkconfig_dns ; then
- echo "Setting DNS domainname to ${DNSDOMAIN} ..."
- resolv=$(grep -v '^[[:space:]]*domain' /etc/resolv.conf)
+ @echo@ "Setting DNS domainname to ${DNSDOMAIN} ..."
+ resolv=$(@grep@ -v '^[[:space:]]*domain' /etc/resolv.conf)
[[ ${OVERRIDE} == "1" ]] \
&& resolv="${resolv}"$'\n'"domain ${DNSDOMAIN}" \
- || resolv="domain ${DNSDOMAIN}"$'\n'"${resolv}"
- echo "${resolv}" > /etc/resolv.conf
+ || resolv="@domain@ ${DNSDOMAIN}"$'\n'"${resolv}"
+ @echo@ "${resolv}" > /etc/resolv.conf
retval2=$?
fi
Modified: initng/initfiles/system/dotnet.ii
==============================================================================
--- initng/initfiles/system/dotnet.ii (original)
+++ initng/initfiles/system/dotnet.ii Tue Nov 8 00:57:03 2005
@@ -6,35 +6,35 @@
if [ -e /etc/conf.d/dotnet ]; then
source /etc/conf.d/dotnet
fi
-echo "Registering .NET IL binaries with ${CLR}"
+ at echo@ "Registering .NET IL binaries with ${CLR}"
if [ ! -d /proc/sys/fs/binfmt_misc ]; then
- echo "You need support for \"misc binaries\" in your kernel!"
+ @echo@ "You need support for \"misc binaries\" in your kernel!"
exit 1
fi
-mount | grep -q binfmt_misc
+ at mount@ | @grep@ -q binfmt_misc
if [ $? != 0 ]; then
- mount -t binfmt_misc binfmt_misc /proc/sys/fs/binfmt_misc
+ @mount@ -t binfmt_misc binfmt_misc /proc/sys/fs/binfmt_misc
if [ $? != 0 ]; then
exit 1
fi
fi
case "${CLR}" in
-mono ) echo ':CLR:M::MZ::/usr/bin/mono:' > /proc/sys/fs/binfmt_misc/register
+mono ) @echo@ ':CLR:M::MZ::@/usr/bin/mono@:' > /proc/sys/fs/binfmt_misc/register
exit 0
;;
-ilrun ) echo ':CLR:M::MZ::/usr/bin/ilrun:' > /proc/sys/fs/binfmt_misc/register
+ilrun ) @echo@ ':CLR:M::MZ::@/usr/bin/ilrun@:' > /proc/sys/fs/binfmt_misc/register
exit 0
;;
-* ) echo 'Please enter a valid option in /etc/conf.d/dotnet'
+* ) @echo@ 'Please enter a valid option in /etc/conf.d/dotnet'
exit 1
;;
esac
}
stop {
-echo "Unregistering .NET IL binaries"
+ at echo@ "Unregistering .NET IL binaries"
if [ -f /proc/sys/fs/binfmt_misc/CLR ]; then
- echo '-1' > /proc/sys/fs/binfmt_misc/CLR
+ @echo@ '-1' > /proc/sys/fs/binfmt_misc/CLR
fi
exit $?
}
Modified: initng/initfiles/system/firestarter.ii
==============================================================================
--- initng/initfiles/system/firestarter.ii (original)
+++ initng/initfiles/system/firestarter.ii Tue Nov 8 00:57:03 2005
@@ -7,8 +7,8 @@
service service/firestarter {
need = system/initial system/mountroot net/lo
require_network
- start = /etc/firestarter/firestarter.sh
- stop = /etc/firestarter/firestarter.sh
+ start = @/etc/firestarter/firestarter.sh@
+ stop = @/etc/firestarter/firestarter.sh@
start_args = start
stop_args = stop
}
Modified: initng/initfiles/system/guarddog.ii
==============================================================================
--- initng/initfiles/system/guarddog.ii (original)
+++ initng/initfiles/system/guarddog.ii Tue Nov 8 00:57:03 2005
@@ -4,23 +4,23 @@
start = /etc/rc.firewall
stop {
- if [ -x /sbin/iptables ]; then
- iptables -P OUTPUT ACCEPT
- iptables -P INPUT ACCEPT
- iptables -P FORWARD ACCEPT
- iptables -F
- iptables -X
+ if [ -x /sbin/@iptables@ ]; then
+ @iptables@ -P OUTPUT ACCEPT
+ @iptables@ -P INPUT ACCEPT
+ @iptables@ -P FORWARD ACCEPT
+ @iptables@ -F
+ @iptables@ -X
exit 0;
fi
- if [ -x /sbin/ipchains ]; then
- ipchains -P output ACCEPT
- ipchains -P input ACCEPT
- ipchains -P forward ACCEPT
- ipchains -F
- ipchains -X
+ if [ -x /sbin/@ipchains@ ]; then
+ @ipchains@ -P output ACCEPT
+ @ipchains@ -P input ACCEPT
+ @ipchains@ -P forward ACCEPT
+ @ipchains@ -F
+ @ipchains@ -X
exit 0;
fi
- echo "Cannot find /sbin/ipchains or /sbin/iptables"
+ @echo@ "Cannot find /sbin/@ipchains@ or /sbin/@iptables@"
exit 1
}
}
Modified: initng/initfiles/system/hdparm.ii
==============================================================================
--- initng/initfiles/system/hdparm.ii (original)
+++ initng/initfiles/system/hdparm.ii Tue Nov 8 00:57:03 2005
@@ -38,19 +38,17 @@
then
orgdevice=`readlink -f $device`
if [ -b $orgdevice ]; then
- #echo "Running hdparm on $device ..."
- hdparm $args $device > /dev/null || echo "Failed to run hdparm on $device." &
+ #@echo@ "Running hdparm on $device ..."
+ @hdparm@ $args $device > /dev/null || @echo@ "Failed to run hdparm on $device." &
fi
fi
}
- which hdparm 2>&1 >/dev/null || echo "hdparm not found"
-
if [ -d /dev/ide ]
then
# devfs compatible systems
- for device in $(find /dev/ide -name disc)
+ for device in $(@find@ /dev/ide -name disc)
do
args=''
@@ -79,7 +77,7 @@
done
- for device in $(find /dev/ide -name cd)
+ for device in $(@find@ /dev/ide -name cd)
do
args=''
@@ -111,7 +109,7 @@
let count=0
# of course, the sort approach would fail here if any of the
# host/bus/target/lun numbers reached 2 digits..
- for device in $(find /dev/ide -name generic | sort)
+ for device in $(@find@ /dev/ide -name generic | sort)
do
eval args=\${generic${count}_args}
do_hdparm
Modified: initng/initfiles/system/hostname.ii
==============================================================================
--- initng/initfiles/system/hostname.ii (original)
+++ initng/initfiles/system/hostname.ii Tue Nov 8 00:57:03 2005
@@ -8,7 +8,7 @@
. /etc/sysconfig/network
fi
- myhost=$(/bin/hostname 2>/dev/null)
+ myhost=$(@/bin/hostname@ 2>/dev/null)
retval=0
# If the hostname is already set via the kernel, and /etc/hostname
@@ -18,19 +18,19 @@
fi
if [ -f /etc/hostname ] ; then
- #echo "You should stop using /etc/hostname and use /etc/conf.d/hostname"
- myhost=$(cat /etc/hostname)
+ #@echo@ "You should stop using /etc/hostname and use /etc/conf.d/hostname"
+ myhost=$(@cat@ /etc/hostname)
else
myhost=${HOSTNAME}
fi
- echo "Setting hostname to ${myhost} ..."
- /bin/hostname "${myhost}"
+ @echo@ "Setting hostname to ${myhost} ..."
+ @/bin/hostname@ "${myhost}"
retval=$?
if [ "${retval}" -eq 0 ] ; then
# setup $HOSTNAME, ignore errors in case /etc is readonly.
- echo "HOSTNAME=\"${myhost}\"" 2>/dev/null >/etc/env.d/01hostname
+ @echo@ "HOSTNAME=\"${myhost}\"" 2>/dev/null >/etc/env.d/01hostname
fi
exit ${retval}
More information about the Initng-svn
mailing list