-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
hwdetector #7
base: Kyryl.Krynychnyi
Are you sure you want to change the base?
hwdetector #7
Conversation
Signed-off-by: Yevgen Kovalyov <[email protected]>
Signed-off-by: Kyryl Krynychnyi <[email protected]>
Create two tmp files. Redirect an output of ls /dev to these files and compare them. If the script is interrupted or exited, delete tmp files Signed-off-by: Kyryl Krynychnyi <[email protected]>
USB flash detector is a result of comparison of outputs of ls /dev/sd[a-z]. Change output format and add delay. Signed-off-by: Kyryl Krynychnyi <[email protected]>
i2c detector checks the output of i2cdetect -l SD card detector checks the output of ls /dev Signed-off-by: Kyryl Krynychnyi <[email protected]>
Signed-off-by: Kyryl Krynychnyi <[email protected]>
Signed-off-by: Kyryl Krynychnyi <[email protected]>
hwdetect/hwdetect.sh
Outdated
fi | ||
|
||
sleep 1 | ||
trap 'rm -f $usb0 $usb1 $flash0 $flash1 $i2c0 $i2c1 $sd0 $sd1 && echo -e "\n***********Detection ended***********" && exit' 2 3 15 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it required to configure signal handlers every second? What will happen in case of program break before end of loop?
Signed-off-by: Kyryl Krynychnyi <[email protected]>
hwdetect/hwdetect.sh
Outdated
@@ -47,6 +47,8 @@ else | |||
fi | |||
echo | |||
|
|||
trap 'rm -f $usb0 $usb1 $flash0 $flash1 $i2c0 $i2c1 $sd0 $sd1 && echo -e "\n***********Detection ended***********" && exit' 2 3 15 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line is too long. Is it possible to fit it to 80 columns by adding some variable like ALL_TMP_FILES or/and MSG_TEXT?
Signed-off-by: Kyryl Krynychnyi <[email protected]>
Signed-off-by: Kyryl Krynychnyi <[email protected]>
No description provided.