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 ---
|
||||
# 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() {
|
||||
local os=$(cat /etc/os-release | grep ^ID= | sed 's/"//g')
|
||||
if echo $os | grep -q -e centos -e redhat; then
|
||||
yum install -y net-tools iptables iputils openvpn openssl11 openvswitch dnsmasq
|
||||
elif echo $os | grep -q -e debian -e ubuntu; then
|
||||
apt-get install -y net-tools iptables iproute2 openvpn openssl openvswitch-switch dnsmasq
|
||||
if type yum > /dev/null; then
|
||||
yum install -y net-tools iptables iputils openvpn openvswitch dnsmasq
|
||||
elif type apt > /dev/null; then
|
||||
apt-get install -y net-tools iptables iproute2 openvpn openvswitch-switch dnsmasq
|
||||
else
|
||||
echo "We didn't find yum and apt."
|
||||
fi
|
||||
}
|
||||
|
||||
|
@@ -9,8 +9,10 @@ import (
|
||||
|
||||
func TestSwitch_LoadPass(t *testing.T) {
|
||||
sw := &Switch{}
|
||||
sw.LoadPass("../../.password.no")
|
||||
sw.LoadPass("../../packaging/resource/password.example")
|
||||
cache.User.SetFile("../../.password.no")
|
||||
sw.LoadPass()
|
||||
cache.User.SetFile("../../packaging/resource/password.example")
|
||||
sw.LoadPass()
|
||||
for user := range cache.User.List() {
|
||||
if user == nil {
|
||||
break
|
||||
|
Reference in New Issue
Block a user