From: gobo72 Date: Wed, 23 Mar 2011 01:27:43 +0000 (+0000) Subject: -Change permissions /etc/sudoers X-Git-Url: http://gitweb.hugovil.com/?a=commitdiff_plain;h=38a036800434ff4f8381cfb921b2f216937a43e9;p=hvlinux.git -Change permissions /etc/sudoers -Ne mets pas les variables inutilisees pour les configs de cartes reseau --- diff --git a/stage2/install-bootscripts b/stage2/install-bootscripts index 63415ee..d6acdd0 100755 --- a/stage2/install-bootscripts +++ b/stage2/install-bootscripts @@ -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 diff --git a/stage3/pkg/sudo b/stage3/pkg/sudo index 3005332..97797d1 100644 --- a/stage3/pkg/sudo +++ b/stage3/pkg/sudo @@ -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 }