Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Arch Linux
netctl
Commits
ca3e0f60
Commit
ca3e0f60
authored
Jul 03, 2012
by
Jouke Witteveen
Browse files
Cleanup src/network
quirk() is not used anymore, inarray() doesn't belong in src/network.
parent
6ed493ee
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/globals
View file @
ca3e0f60
...
...
@@ -94,6 +94,19 @@ function checkyesno() {
esac
}
## Check if variable is a member of an array
# $1: the variable to find
# $2...: the array elements
function
inarray
()
{
local
item
search
=
"
$1
"
shift
for
item
in
"
$@
"
;
do
if
[[
"
$item
"
==
"
$search
"
]]
;
then
return
0
fi
done
return
1
}
## Waits until a statement succeeds or a timeout occurs
# $1: timeout in seconds
...
...
src/network
View file @
ca3e0f60
...
...
@@ -238,28 +238,6 @@ profile_down()
)
;
return
$?
}
## Check if variable is a member of an array
# $1: the variable to find
# $2...: the array elements
inarray
()
{
local
item
search
=
"
$1
"
shift
for
item
in
"
$@
"
;
do
if
[[
"
$item
"
==
"
$search
"
]]
;
then
return
0
fi
done
return
1
}
## Check if a given quirk is enabled
# $1: the quirk name
quirk
()
{
inarray
"
$1
"
"
${
QUIRKS
[@]
}
"
return
$?
}
# interface_down interface
# take interface down
#
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment