Work on all shells
authorRoy Marples <uberlord@gentoo.org>
Thu, 5 Apr 2007 15:11:50 +0000 (15:11 +0000)
committerRoy Marples <uberlord@gentoo.org>
Thu, 5 Apr 2007 15:11:50 +0000 (15:11 +0000)
Package-Manager: portage-2.1.2.3

net-misc/udhcp/Manifest
net-misc/udhcp/files/udhcpc.sh

index 3c7a2d489367119ee98519fceaa5c5a2ad785b31..951bdfe7bbc24d075f3b6b53f6849394d234ab8c 100644 (file)
@@ -1,6 +1,3 @@
------BEGIN PGP SIGNED MESSAGE-----
-Hash: SHA1
-
 AUX udhcp-0.9.9_pre20041216-env.patch 3599 RMD160 4f111f1769232f3bddf5881f8b4a339e74e8309d SHA1 afd89eab23146c490a9597cfa541d66623d370b8 SHA256 5ee4c293e667f4bfa5f8a5a50ce1b1cc3b2dda5de000094fd698e7736ee28c17
 MD5 64bb08e23054a3867d2cc4b2014e97e0 files/udhcp-0.9.9_pre20041216-env.patch 3599
 RMD160 4f111f1769232f3bddf5881f8b4a339e74e8309d files/udhcp-0.9.9_pre20041216-env.patch 3599
@@ -13,10 +10,10 @@ AUX udhcp.rc 819 RMD160 b80fee5a52c80913ed838f52341e6bacb8e4a576 SHA1 593a4bed11
 MD5 27d1351fca38c390e2cf8d3fc0596050 files/udhcp.rc 819
 RMD160 b80fee5a52c80913ed838f52341e6bacb8e4a576 files/udhcp.rc 819
 SHA256 7579fbea1af3327c6cd0e9a75517d4b785dec9d1371065552c3d33683a1ba9cb files/udhcp.rc 819
-AUX udhcpc.sh 2448 RMD160 da50cc701398ebc9324c885e0a161a58e51f798f SHA1 567b85273efc52146fe9b05f9ac9b648f9cf43c7 SHA256 db1e46cd54a19a3f18e9127422e6d292039f5b0e166b118f43dcad309107a43b
-MD5 1c8b2d4d39c05153522738aca4dc26fb files/udhcpc.sh 2448
-RMD160 da50cc701398ebc9324c885e0a161a58e51f798f files/udhcpc.sh 2448
-SHA256 db1e46cd54a19a3f18e9127422e6d292039f5b0e166b118f43dcad309107a43b files/udhcpc.sh 2448
+AUX udhcpc.sh 2404 RMD160 c8ce37955f36cb8282352dac2494ee821a663e65 SHA1 9738b949e74e1bafc98c387f982d83cc80189892 SHA256 4e9c1c0c3f479f95a84b91df8ba1f4096d657c53e54e1f4b814d83629de08e6b
+MD5 eee6a1636fd9f07e25bac8a1f9a7bc44 files/udhcpc.sh 2404
+RMD160 c8ce37955f36cb8282352dac2494ee821a663e65 files/udhcpc.sh 2404
+SHA256 4e9c1c0c3f479f95a84b91df8ba1f4096d657c53e54e1f4b814d83629de08e6b files/udhcpc.sh 2404
 DIST udhcp-0.9.8.tar.gz 43889 RMD160 55f3c346e39bc65d6941afccb5ef51a4b5239b37 SHA1 57f5fcd18effe77cff48e8221a20976a3be1f55a SHA256 da0ca1e821e3fa7cfbe73ddb1480b921002ee992f5e5fbc611422c103b907443
 DIST udhcp-0.9.9_pre20041216.tar.bz2 42353 RMD160 ed223b166f9ab9c0e0b210b690319e3ca8417af5 SHA1 f4555fe1c98305b23fdae4e520ec564703ab89a8 SHA256 e4bcf9490f5e5c14a97d6ca46f054225e15a765edf9cdb181888032a0082dad6
 EBUILD udhcp-0.9.8-r3.ebuild 1166 RMD160 386711e40d25bfae45fd8500a34c167efa0c8495 SHA1 dd8a0dd922a862efb55c7088064caa0cc72b6b71 SHA256 86b8bdb9f65695e9cf3fcf850072df2fef5d9044158029b66f8f9de096a40378
@@ -55,10 +52,3 @@ SHA256 8e1df539da56f114fe2b51e764815ff78da8a95d378222fce1568467d63f19e0 files/di
 MD5 3abdec37a6b19a6b855f1a7b4f291234 files/digest-udhcp-0.9.9_pre20041216-r4 271
 RMD160 a3cc96f239981b7db322e546083f1a17563e4d51 files/digest-udhcp-0.9.9_pre20041216-r4 271
 SHA256 8e1df539da56f114fe2b51e764815ff78da8a95d378222fce1568467d63f19e0 files/digest-udhcp-0.9.9_pre20041216-r4 271
------BEGIN PGP SIGNATURE-----
-Version: GnuPG v2.0.3 (GNU/Linux)
-
-iD8DBQFGCgeD8bi6rjpTunYRAsZ2AJ9km879rCroWePxKH/iJpHJ23BTeQCfTrmE
-vUv30BtNQMSAx/HE6NlKtPc=
-=vs6j
------END PGP SIGNATURE-----
index 83cb1d9d1470cde8584c90781b4df9e19c2a503b..14530833d40b505418a77219a9c04b87d5435db9 100644 (file)
@@ -8,25 +8,25 @@ PATH=/bin:/usr/bin:/sbin:/usr/sbin
 
 update_dns()
 {
-       [[ -n "${PEER_DNS}" ]] && [[ "${PEER_DNS}" != "yes" ]] && return
-       [[ -z "${domain}" ]] && [[ -z "${dns}" ]] && return
+       [ -n "${PEER_DNS}" ] && [ "${PEER_DNS}" != "yes" ] && return
+       [ -z "${domain}" ] && [ -z "${dns}" ] && return
 
        conf="# Generated by udhcpc for ${interface}\n"
-       [[ -n "${domain}" ]] && conf="${conf}search ${domain}\n"
+       [ -n "${domain}" ] && conf="${conf}search ${domain}\n"
        for i in ${dns} ; do
                conf="${conf}nameserver ${i}\n"
        done
-       if [[ -x /sbin/resolvconf ]] ; then
-               echo -e "${conf}" | resolvconf -a ${interface}
+       if [ -x /sbin/resolvconf ] ; then
+               printf "${conf}" | resolvconf -a ${interface}
        else
-               echo -e "${conf}" > /etc/resolv.conf
+               printf "${conf}" > /etc/resolv.conf
                chmod 644 /etc/resolv.conf
        fi
 }
 
 update_ntp() {
-       [[ -n "${PEER_NTP}" ]] && [[ "${PEER_NTP}" != "yes" ]] && return
-       [[ -z "${ntpsrv}" ]] && return
+       [ -n "${PEER_NTP}" ] && [ "${PEER_NTP}" != "yes" ] && return
+       [ -z "${ntpsrv}" ] && return
        
        conf="# Generated by udhcpc for interface ${interface}\n"
        conf="${conf}restrict default noquery notrust nomodify\n"
@@ -37,23 +37,23 @@ update_ntp() {
        done
        conf="${conf}driftfile /var/lib/ntp/ntp.drift\n"
        conf="${conf}logfile /var/log/ntp.log\n"
-       echo -e "${conf}" > /etc/ntp.conf
+       printf "${conf}" > /etc/ntp.conf
        chmod 644 /etc/ntp.conf
 }
 
 update_hostname() {
-       [[ -n "${PEER_HOSTNAME}" ]] && [[ "${PEER_HOSTNAME}" != "yes" ]] && return
-       [[ -z "${hostname}" ]] && return
+       [ -n "${PEER_HOSTNAME}" ] && [ "${PEER_HOSTNAME}" != "yes" ] && return
+       [ -z "${hostname}" ] && return
 
        myhost="$(hostname)"
-       [[ -z ${myhost} ]] || [[ ${myhost} == "(none)" ]] && hostname "${hostname}"
+       [ -z "${myhost}" ] || [ "${myhost}" = "(none)" ] && hostname "${hostname}"
 }
 
 update_interface()
 {
-       [[ -n "${broadcast}" ]] && broadcast="broadcast ${broadcast}"
-       [[ -n "${subnet}" ]] && netmask="netmask ${subnet}"
-       [[ -n "${mtu}" ]] && mtu="mtu ${mtu}"
+       [ -n "${broadcast}" ] && broadcast="broadcast ${broadcast}"
+       [ -n "${subnet}" ] && netmask="netmask ${subnet}"
+       [ -n "${mtu}" ] && mtu="mtu ${mtu}"
        ifconfig "${interface}" ${ip} ${broadcast} ${netmask} ${mtu}
 }
 
@@ -63,11 +63,11 @@ update_routes()
                :
        done
         
-       [[ -n "${PEER_ROUTERS}" ]] && [[ "${PEER_ROUTERS}" != "yes" ]] && return
+       [ -n "${PEER_ROUTERS}" ] && [ "${PEER_ROUTERS}" != "yes" ] && return
        
-       if [[ -n "${router}" ]] ; then
+       if [ -n "${router}" ] ; then
                metric=
-               [[ -n "${IF_METRIC}" ]] && metric="metric ${IF_METRIC}"
+               [ -n "${IF_METRIC}" ] && metric="metric ${IF_METRIC}"
                for i in ${router} ; do
                        route add default gw "${i}" ${metric} dev "${interface}"
                done
@@ -77,7 +77,7 @@ update_routes()
 deconfig()
 {
        ifconfig "${interface}" 0.0.0.0
-       [[ -x /sbin/resolvconf ]] && resolvconf -d "${interface}"
+       [ -x /sbin/resolvconf ] && resolvconf -d "${interface}"
 }
 
 case "$1" in