mirror of
https://github.com/luscis/openlan.git
synced 2025-10-07 01:22:51 +08:00
fix: yum install failed for centos like.
This commit is contained in:
2
dist/resource/point.cfg
vendored
2
dist/resource/point.cfg
vendored
@@ -1,4 +1,4 @@
|
|||||||
# --- point.cfg ---
|
# --- point.cfg ---
|
||||||
# This file define the configuration for OpenLAN Point.
|
# This file define the configuration for OpenLAN Point.
|
||||||
|
|
||||||
OPTIONS='-log:file /dev/null -terminal off -cacert /etc/openlan/ca-trusted.crt'
|
OPTIONS='-log:file /dev/null -terminal off'
|
||||||
|
11
dist/script/install.sh
vendored
11
dist/script/install.sh
vendored
@@ -12,11 +12,12 @@ function download() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function requires() {
|
function requires() {
|
||||||
local os=$(cat /etc/os-release | grep ^ID= | sed 's/"//g')
|
if type yum > /dev/null; then
|
||||||
if echo $os | grep -q -e centos -e redhat; then
|
yum install -y net-tools iptables iputils openvpn openvswitch dnsmasq
|
||||||
yum install -y net-tools iptables iputils openvpn openssl11 openvswitch dnsmasq
|
elif type apt > /dev/null; then
|
||||||
elif echo $os | grep -q -e debian -e ubuntu; then
|
apt-get install -y net-tools iptables iproute2 openvpn openvswitch-switch dnsmasq
|
||||||
apt-get install -y net-tools iptables iproute2 openvpn openssl openvswitch-switch dnsmasq
|
else
|
||||||
|
echo "We didn't find yum and apt."
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -9,8 +9,10 @@ import (
|
|||||||
|
|
||||||
func TestSwitch_LoadPass(t *testing.T) {
|
func TestSwitch_LoadPass(t *testing.T) {
|
||||||
sw := &Switch{}
|
sw := &Switch{}
|
||||||
sw.LoadPass("../../.password.no")
|
cache.User.SetFile("../../.password.no")
|
||||||
sw.LoadPass("../../packaging/resource/password.example")
|
sw.LoadPass()
|
||||||
|
cache.User.SetFile("../../packaging/resource/password.example")
|
||||||
|
sw.LoadPass()
|
||||||
for user := range cache.User.List() {
|
for user := range cache.User.List() {
|
||||||
if user == nil {
|
if user == nil {
|
||||||
break
|
break
|
||||||
|
Reference in New Issue
Block a user