- removable=$(cat $device/removable)
- if [[ $removable -ne 1 ]]; then
- continue
- fi
-
- partitions=$(/bin/awk "\$4 ~ /$(basename $device)[0-9]*/ { print \$4 }" /proc/partitions)
- for partition in $partitions ; do
- check_dev=/dev/$partition
-
- echo $(date "+%H:%M:%S") " 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
- conf_file="$CONF_DEVICE_MOUNT_POINT/$NEW_NODE_CONF_NAME"
- echo $(date "+%H:%M:%S") " pl_netinit: found node configuration file $conf_file"
- /etc/init.d/pl_validateconf < $conf_file > $USED_NET_CONF
- echo $(date "+%H:%M:%S") " pl_netinit: found configuration"
- /bin/umount $CONF_DEVICE_MOUNT_POINT
- return 1
- fi
-
- echo $(date "+%H:%M:%S") " pl_netinit: not found"
-
- /bin/umount $CONF_DEVICE_MOUNT_POINT
- fi
- done
+ removable=$(cat $device/removable)
+ if [[ $removable -ne 1 ]]; then
+ continue
+ fi
+
+ partitions=$(/bin/awk "\$4 ~ /$(basename $device)[0-9]*/ { print \$4 }" /proc/partitions)
+ for partition in $partitions ; do
+ check_dev=/dev/$partition
+
+ verbose-message "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
+ conf_file="$CONF_DEVICE_MOUNT_POINT/$NEW_NODE_CONF_NAME"
+ verbose-message "pl_netinit: found node configuration file $conf_file"
+ /etc/init.d/pl_validateconf < $conf_file > $USED_NET_CONF
+ verbose-message "pl_netinit: found configuration"
+ /bin/umount $CONF_DEVICE_MOUNT_POINT
+ return 1
+ fi
+
+ verbose-message "pl_netinit: ERROR - not found"
+
+ /bin/umount $CONF_DEVICE_MOUNT_POINT
+ fi
+ done