Почему udev не наблюдает за сетевым устройством cdc_ether?

Я не уверен на 100%, как вы запускаете этот скрипт, но я бы переписал вот так (я также включены комментарии):

#!/bin/sh
# This is a comment line, but the line above must be the first line
# and defines the shell that the rest of this script will use.

echo "PATH: ["$PATH"]"
# Personally, I like to include [] around vars so I can see 
# exactly what they are

# Run a few network related commands
nslookup www.fiu.edu

netstate -a

traceroute www.google.com

ifconfig

# Pause the script with a question. This will stop the script 
# from simply closing. Default to "y" as well so the user can 
# just hit the enter key to exit.
echo -n "Finished? [y/n](y) "
read ans

# Check what the user typed - if anything
if [ "$ans" = "" -o "$ans" = "Y" -o "$ans" = "y" ]
then
    # Exit with 0 to signify no issue.
    exit 0
else
    echo "All done, so exiting anyway :]"
    exit 0
fi
2
28.10.2016, 17:36
0 ответов

Теги

Похожие вопросы