X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=conf_files%2Fpl_netinit;fp=conf_files%2Fpl_netinit;h=1aced1ba56d70d33037e0c0b3fb2971b7185be7b;hb=14c4b7c9d4960d3ff7567e751a1d58886b8a3e52;hp=a627bd22ba4a717e109170823394c8b9c10ace66;hpb=36e2a978768633b0c489e2e912297ac945f747c6;p=bootcd.git diff --git a/conf_files/pl_netinit b/conf_files/pl_netinit index a627bd2..1aced1b 100644 --- a/conf_files/pl_netinit +++ b/conf_files/pl_netinit @@ -135,26 +135,29 @@ find_node_config() continue fi - check_dev=/dev/`basename $device`1 - - echo "pl_netinit: looking for node configuration file on device $check_dev" - /bin/mount -o ro -t $NODE_CONF_DEVICE_FS_TYPES $check_dev \ - $CONF_DEVICE_MOUNT_POINT 2>&1 > /dev/null - if [[ $? -eq 0 ]]; then - if [ -r "$CONF_DEVICE_MOUNT_POINT/$NEW_NODE_CONF_NAME" ]; then - echo "pl_netinit: found node configuration file plnode.txt, using" - - conf_file="$CONF_DEVICE_MOUNT_POINT/$NEW_NODE_CONF_NAME" - /etc/init.d/pl_validateconf < $conf_file > $USED_NET_CONF - echo "pl_netinit: found configuration" + partitions=$(/bin/awk "\$4 ~ /`basename $device`[0-9]*/ { print \$4 }" /proc/partitions) + for partition in $partitions ; do + check_dev=/dev/$partition + + echo "pl_netinit: looking for node configuration file on device $check_dev" + /bin/mount -o ro -t $NODE_CONF_DEVICE_FS_TYPES $check_dev \ + $CONF_DEVICE_MOUNT_POINT 2>&1 > /dev/null + if [[ $? -eq 0 ]]; then + if [ -r "$CONF_DEVICE_MOUNT_POINT/$NEW_NODE_CONF_NAME" ]; then + echo "pl_netinit: found node configuration file plnode.txt, using" + + conf_file="$CONF_DEVICE_MOUNT_POINT/$NEW_NODE_CONF_NAME" + /etc/init.d/pl_validateconf < $conf_file > $USED_NET_CONF + echo "pl_netinit: found configuration" + /bin/umount $CONF_DEVICE_MOUNT_POINT + return 1 + fi + + echo "pl_netinit: not found" + /bin/umount $CONF_DEVICE_MOUNT_POINT - return 1 fi - - echo "pl_netinit: not found" - - /bin/umount $CONF_DEVICE_MOUNT_POINT - fi + done done # normal filename expansion setting