-Change permissions /etc/sudoers
authorgobo72 <gobo72@364a67c3-989e-7be9-548d-dae8560ea662>
Wed, 23 Mar 2011 01:27:43 +0000 (01:27 +0000)
committergobo72 <gobo72@364a67c3-989e-7be9-548d-dae8560ea662>
Wed, 23 Mar 2011 01:27:43 +0000 (01:27 +0000)
-Ne mets pas les variables inutilisees pour les configs de cartes reseau

stage2/install-bootscripts
stage3/pkg/sudo

index 63415ee..d6acdd0 100755 (executable)
@@ -17,16 +17,21 @@ for nic_device in ${INTERFACES}; do
     file="/etc/sysconfig/network/ifconfig.${nic_device}"
     echo "ONBOOT=\"yes\"" > ${file}
     echo "BOOTPROTO=\"${BOOTPROTO[${LOOP_INDEX}]}\"" >> ${file}
-    echo "IPADDR=\"${IP_ADDRESS[${LOOP_INDEX}]}\"" >> ${file}
-    echo "PREFIX_LENGTH=\"${PREFIX_LENGTH[${LOOP_INDEX}]}\"" >> ${file}
-    echo "IFSCOPE=\"\"" >> ${file}
-    echo "GATEWAY=\"${GATEWAY[${LOOP_INDEX}]}\"" >> ${file}
-
     if [ "x${BOOTPROTO[${LOOP_INDEX}]}" = "xdhcp" -o \
         "x${BOOTPROTO[${LOOP_INDEX}]}" = "xwifi" ]; then
        DHCP_USED="yes"
     fi
 
+    if [ -n "${IP_ADDRESS[${LOOP_INDEX}]}" ]; then
+        echo "IPADDR=\"${IP_ADDRESS[${LOOP_INDEX}]}\"" >> ${file}
+    fi
+    if [ -n "${PREFIX_LENGTH[${LOOP_INDEX}]}" ]; then
+        echo "PREFIX_LENGTH=\"${PREFIX_LENGTH[${LOOP_INDEX}]}\"" >> ${file}
+    fi
+    if [ -n "${GATEWAY[${LOOP_INDEX}]}" ]; then
+        echo "GATEWAY=\"${GATEWAY[${LOOP_INDEX}]}\"" >> ${file}
+    fi
+
     LOOP_INDEX=$((${LOOP_INDEX} + 1))
 done
 
index 3005332..97797d1 100644 (file)
@@ -11,5 +11,5 @@ ADMIN       ALL = NOPASSWD: ALL
 EOF
 
     sed -i -e "s!_REGUSER_!${REGUSER}!g" /etc/sudoers
-    chmod 600 /etc/sudoers
+    chmod 440 /etc/sudoers
 }