Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
mdmngr
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
IOPSYS
mdmngr
Commits
981870c6
Commit
981870c6
authored
7 years ago
by
Jakob Olsson
Browse files
Options
Downloads
Patches
Plain Diff
remove dongle_hotplug dependency on some bool-file, different static approach
parent
f2bbe516
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dongle_hotplug
+18
-24
18 additions, 24 deletions
dongle_hotplug
with
18 additions
and
24 deletions
dongle_hotplug
+
18
−
24
View file @
981870c6
#echo "DEVTYPE - $DEVTYPE " > /dev/console
#echo "DEVTYPE - $DEVTYPE " > /dev/console
#echo "DEVPATH - $DEVPATH " > /dev/console
#echo "DEVPATH - $DEVPATH " > /dev/console
DEV_MOUNTPATH=`echo "$DEVPATH" | cut -d'/' -f 1-7`
if [ "$ACTION" == "remove" ]; then
JUNK=`echo "$DEVPATH" | cut -d'/' -f 8`
#echo "tmp file removed!" > /dev/console
#echo "dev_path: $DEVPATH" > /dev/console
rm -r /tmp/donglehotplug
fi
if [[ -f /tmp/donglehotplug ]] ; then
#echo "File exists" > /dev/console
exit
fi
DEV_MOUNTPATH=`echo "$DEVPATH" | cut -d'/' -f 1-6`
#echo "dongle path: $DEV_MOUNTPATH" > /dev/console
#echo "dongle path: $DEV_MOUNTPATH" > /dev/console
#echo "JUNK: $JUNK" > /dev/console
case "$ACTION" in
case "$ACTION" in
add)
add)
ubus call dongle alert '{"path":"/sys'${DEV_MOUNTPATH}'"}'
if [ -z "$JUNK" ];then
echo "ubus call dongle alert '{\"path\":\"/sys$DEV_MOUNTPATH\"}'" > /dev/console
ubus call dongle alert '{"path":"/sys'${DEV_MOUNTPATH}'"}'
touch /tmp/donglehotplug
echo "ubus call dongle alert '{\"path\":\"/sys$DEV_MOUNTPATH\"}'" > /dev/console
;;
touch /tmp/donglehotplug
remove)
fi
echo "dongle removed!"
;;
;;
remove)
*)
echo "dongle removed!"
echo "Action: Neither add nor remove" > /dev/console
ubus call dongle update
;;
;;
*)
echo "Action: Neither add nor remove" > /dev/console
;;
esac
esac
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment