Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
Config
Commits
bbd056c7
Commit
bbd056c7
authored
Aug 06, 2017
by
Igor Pecovnik
Browse files
Added USB redirector install
parent
91d7e359
Changes
2
Hide whitespace changes
Inline
Side-by-side
debian-config
View file @
bbd056c7
...
...
@@ -45,6 +45,14 @@ DISTROID=$(lsb_release -rs)
BACKTITLE
=
"
$ARMBIAN
$DISTRO
$DISTROID
configuration utility, http://www.armbian.com"
TITLE
=
"Configuring
$BOARD_NAME
"
check_port
()
{
#------------------------------------------------------------------------------------------------------------------------------------------
# Check if something is running on port $1 and display info
#------------------------------------------------------------------------------------------------------------------------------------------
[[
-n
$(
netstat
-lnt
|
awk
'$6 == "LISTEN" && $4 ~ ".'
$1
'"'
)
]]
&&
dialog
--backtitle
"
$BACKTITLE
"
--title
"Checking service"
\
--msgbox
"
\n
It looks good.
\n\n
There is
$2
service on port
$1
"
9 52
}
#-----------------------------------------------------------------------------------------------------------------------------------------#
#
...
...
@@ -280,6 +288,12 @@ while true; do
fi
fi
if
[[
-n
$(
netstat
-lnt
|
awk
'$6 == "LISTEN" && $4 ~ ".'
32032
'"'
)
]]
;
then
LIST+
=(
"USB redirector"
"Disable USB devices sharing over Ethernet"
)
else
LIST+
=(
"USB redirector"
"Enable USB devices sharing over Ethernet"
)
fi
if
[[
-n
$(
apt-mark showhold |
grep
-w
"
$BOARD
"
)
]]
;
then
LIST+
=(
"Unhold"
"Un-Freeze kernel and board support packages"
)
else
...
...
@@ -523,6 +537,29 @@ while true; do
dpkg-reconfigure tzdata
;;
"USB redirector"
)
if
[[
-n
$(
netstat
-lnt
|
awk
'$6 == "LISTEN" && $4 ~ ".'
32032
'"'
)
]]
;
then
[[
-f
/usr/local/usb-redirector/uninstall.sh
]]
&&
/usr/local/usb-redirector/uninstall.sh uninstall
rm
-f
/usr/local/bin/usbclnt
else
TARGET_BRANCH
=
$BRANCH
exceptions
"
$BRANCH
"
IFS
=
'.'
read
-a
array
<<<
$(
uname
-r
)
[[
-z
$(
dpkg
-l
|
grep
linux-headers
)
]]
&&
debconf-apt-progress
--
apt-get
-y
install
linux-headers
${
TARGET_BRANCH
}
-
${
TARGET_FAMILY
}
rm
-rf
/usr/src/usb-redirector-linux-arm-eabi
if
((
"
${
array
[0]
}
"
==
"4"
))
&&
((
"
${
array
[1]
}
"
>=
"1"
))
;
then
wget
-qO-
http://www.incentivespro.com/usb-redirector-linux-arm-eabi.tar.gz |
tar
xz
-C
/usr/src
else
wget
-qO-
https://raw.githubusercontent.com/armbian/build/master/blobs/usb-redirector/usb-redirector-old.tgz |
tar
xz
-C
/usr/src
fi
cd
/usr/src/usb-redirector-linux-arm-eabi/
./installer.sh
install
sleep
2
check_port
"32032"
"USB Redirector"
fi
;;
"Headers"
)
TARGET_BRANCH
=
$BRANCH
exceptions
"
$BRANCH
"
...
...
softy
View file @
bbd056c7
...
...
@@ -125,7 +125,7 @@ check_port ()
#------------------------------------------------------------------------------------------------------------------------------------------
# Check if something is running on port $1 and display info
#------------------------------------------------------------------------------------------------------------------------------------------
[[
-
z
$
(
netstat
-
lnt
|
awk
'$6 == "LISTEN" && $4 ~ ".$1"'
)
]]
&&
dialog
--
backtitle
"
$backtitle
"
--
title
"Checking service"
\
[[
-
n
$
(
netstat
-
lnt
|
awk
'$6 == "LISTEN" && $4 ~ ".
'
$
1
'
"'
)
]]
&&
dialog
--
backtitle
"
$backtitle
"
--
title
"Checking service"
\
--
msgbox
"
\n
It looks good.
\n\n
There is $2 service on port $1"
9
52
}
...
...
Write
Preview
Markdown
is supported
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