mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2026-01-29 00:51:53 +08:00
os configs
This commit is contained in:
2
Makefile
2
Makefile
@@ -85,7 +85,7 @@ _run: _testenv
|
||||
&& cp -r /usr/share/kvmd/configs.default/nginx/* /etc/nginx \
|
||||
&& cp /usr/share/kvmd/configs.default/kvmd/*.yaml /etc/kvmd \
|
||||
&& cp /usr/share/kvmd/configs.default/kvmd/htpasswd /etc/kvmd \
|
||||
&& cp /testenv/kvmd.yaml /etc/kvmd \
|
||||
&& cp /testenv/main.yaml /etc/kvmd \
|
||||
&& nginx -c /etc/nginx/nginx.conf \
|
||||
&& ln -s $(TESTENV_VIDEO) /dev/kvmd-video \
|
||||
&& (losetup -d /dev/kvmd-msd || true) \
|
||||
|
||||
4
PKGBUILD
4
PKGBUILD
@@ -43,13 +43,13 @@ package() {
|
||||
python setup.py install --root="$pkgdir"
|
||||
|
||||
mkdir -p "$pkgdir/usr/lib/systemd/system"
|
||||
cp configs/systemd/*.service "$pkgdir/usr/lib/systemd/system"
|
||||
cp configs/os/systemd/*.service "$pkgdir/usr/lib/systemd/system"
|
||||
|
||||
mkdir -p "$pkgdir/usr/share/kvmd"
|
||||
cp -r web "$pkgdir/usr/share/kvmd"
|
||||
cp -r extras "$pkgdir/usr/share/kvmd"
|
||||
cp -r configs "$pkgdir/usr/share/kvmd/configs.default"
|
||||
rm -rf "$pkgdir/usr/share/kvmd/configs.default/systemd"
|
||||
rm -rf "$pkgdir/usr/share/kvmd/configs.default/os/systemd"
|
||||
sed -i -e "s/^#PROD//g" "$pkgdir/usr/share/kvmd/configs.default/nginx/nginx.conf"
|
||||
find "$pkgdir" -name ".gitignore" -delete
|
||||
find "$pkgdir/usr/share/kvmd/configs.default" -type f -exec chmod 444 '{}' \;
|
||||
|
||||
9
configs/os/boot-config/v1-hdmi-rpi2.txt
Normal file
9
configs/os/boot-config/v1-hdmi-rpi2.txt
Normal file
@@ -0,0 +1,9 @@
|
||||
# See /boot/overlays/README for all available options
|
||||
initramfs initramfs-linux.img followkernel
|
||||
|
||||
hdmi_force_hotplug=1
|
||||
gpu_mem=256
|
||||
start_x=1
|
||||
enable_uart=1
|
||||
dtoverlay=tc358743,i2c_pins_28_29=1
|
||||
dtparam=act_led_gpio=26
|
||||
10
configs/os/boot-config/v1-hdmi-rpi3.txt
Normal file
10
configs/os/boot-config/v1-hdmi-rpi3.txt
Normal file
@@ -0,0 +1,10 @@
|
||||
# See /boot/overlays/README for all available options
|
||||
initramfs initramfs-linux.img followkernel
|
||||
|
||||
hdmi_force_hotplug=1
|
||||
gpu_mem=256
|
||||
start_x=1
|
||||
enable_uart=1
|
||||
dtoverlay=tc358743
|
||||
dtparam=act_led_gpio=26
|
||||
dtoverlay=pi3-disable-bt
|
||||
7
configs/os/boot-config/v1-vga-rpi2.txt
Normal file
7
configs/os/boot-config/v1-vga-rpi2.txt
Normal file
@@ -0,0 +1,7 @@
|
||||
# See /boot/overlays/README for all available options
|
||||
initramfs initramfs-linux.img followkernel
|
||||
|
||||
hdmi_force_hotplug=1
|
||||
gpu_mem=16
|
||||
dtparam=act_led_gpio=26
|
||||
enable_uart=1
|
||||
8
configs/os/boot-config/v1-vga-rpi3.txt
Normal file
8
configs/os/boot-config/v1-vga-rpi3.txt
Normal file
@@ -0,0 +1,8 @@
|
||||
# See /boot/overlays/README for all available options
|
||||
initramfs initramfs-linux.img followkernel
|
||||
|
||||
hdmi_force_hotplug=1
|
||||
gpu_mem=16
|
||||
dtparam=act_led_gpio=26
|
||||
enable_uart=1
|
||||
dtoverlay=pi3-disable-bt
|
||||
3
configs/os/cmdline/v1-hdmi.sed
Normal file
3
configs/os/cmdline/v1-hdmi.sed
Normal file
@@ -0,0 +1,3 @@
|
||||
s/console=ttyAMA0\,115200//g
|
||||
s/kgdboc=ttyAMA0\,115200//g
|
||||
s/rootwait/cma=128M rootwait/g
|
||||
2
configs/os/cmdline/v1-vga.sed
Normal file
2
configs/os/cmdline/v1-vga.sed
Normal file
@@ -0,0 +1,2 @@
|
||||
s/console=ttyAMA0\,115200//g
|
||||
s/kgdboc=ttyAMA0\,115200//g
|
||||
1
configs/os/modules-load/v1-hdmi.conf
Normal file
1
configs/os/modules-load/v1-hdmi.conf
Normal file
@@ -0,0 +1 @@
|
||||
tc358743
|
||||
3
configs/os/sysctl.conf
Normal file
3
configs/os/sysctl.conf
Normal file
@@ -0,0 +1,3 @@
|
||||
# https://github.com/raspberrypi/linux/issues/1753
|
||||
vm.dirty_background_bytes = 5
|
||||
vm.dirty_writeback_centisecs = 25
|
||||
@@ -9,8 +9,8 @@ Type=simple
|
||||
Restart=always
|
||||
RestartSec=3
|
||||
|
||||
ExecStart=/usr/bin/kvmd --config /etc/kvmd/kvmd.yaml
|
||||
ExecStopPost=/usr/bin/kvmd-cleanup --config /etc/kvmd/kvmd.yaml
|
||||
ExecStart=/usr/bin/kvmd
|
||||
ExecStopPost=/usr/bin/kvmd-cleanup
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
5
configs/os/udev/v1-hdmi-rpi2.rules
Normal file
5
configs/os/udev/v1-hdmi-rpi2.rules
Normal file
@@ -0,0 +1,5 @@
|
||||
# https://unix.stackexchange.com/questions/66901/how-to-bind-usb-device-under-a-static-name
|
||||
# https://wiki.archlinux.org/index.php/Udev#Setting_static_device_names
|
||||
KERNEL=="video[0-9]*", SUBSYSTEM=="video4linux", KERNELS=="3f801000.csi1", GROUP="kvmd", SYMLINK+="kvmd-video"
|
||||
KERNEL=="sd[a-z]", SUBSYSTEM=="block", KERNELS=="1-1.4:1.0", GROUP="kvmd", SYMLINK+="kvmd-msd"
|
||||
KERNEL=="ttyAMA0", SYMLINK+="kvmd-hid"
|
||||
5
configs/os/udev/v1-hdmi-rpi3.rules
Normal file
5
configs/os/udev/v1-hdmi-rpi3.rules
Normal file
@@ -0,0 +1,5 @@
|
||||
# https://unix.stackexchange.com/questions/66901/how-to-bind-usb-device-under-a-static-name
|
||||
# https://wiki.archlinux.org/index.php/Udev#Setting_static_device_names
|
||||
KERNEL=="video[0-9]*", SUBSYSTEM=="video4linux", KERNELS=="3f801000.csi1", GROUP="kvmd", SYMLINK+="kvmd-video"
|
||||
KERNEL=="sd[a-z]", SUBSYSTEM=="block", KERNELS=="1-1.1.2:1.0", GROUP="kvmd", SYMLINK+="kvmd-msd"
|
||||
KERNEL=="ttyAMA0", SYMLINK+="kvmd-hid"
|
||||
5
configs/os/udev/v1-vga-rpi2.rules
Normal file
5
configs/os/udev/v1-vga-rpi2.rules
Normal file
@@ -0,0 +1,5 @@
|
||||
# https://unix.stackexchange.com/questions/66901/how-to-bind-usb-device-under-a-static-name
|
||||
# https://wiki.archlinux.org/index.php/Udev#Setting_static_device_names
|
||||
KERNEL=="video[0-9]*", SUBSYSTEM=="video4linux", KERNELS=="1-1.3:1.0", GROUP="kvmd", SYMLINK+="kvmd-video"
|
||||
KERNEL=="sd[a-z]", SUBSYSTEM=="block", KERNELS=="1-1.4:1.0", GROUP="kvmd", SYMLINK+="kvmd-msd"
|
||||
KERNEL=="ttyAMA0", SYMLINK+="kvmd-hid"
|
||||
5
configs/os/udev/v1-vga-rpi3.rules
Normal file
5
configs/os/udev/v1-vga-rpi3.rules
Normal file
@@ -0,0 +1,5 @@
|
||||
# https://unix.stackexchange.com/questions/66901/how-to-bind-usb-device-under-a-static-name
|
||||
# https://wiki.archlinux.org/index.php/Udev#Setting_static_device_names
|
||||
KERNEL=="video[0-9]*", SUBSYSTEM=="video4linux", KERNELS=="1-1.1.3:1.0", GROUP="kvmd", SYMLINK+="kvmd-video"
|
||||
KERNEL=="sd[a-z]", SUBSYSTEM=="block", KERNELS=="1-1.1.2:1.0", GROUP="kvmd", SYMLINK+="kvmd-msd"
|
||||
KERNEL=="ttyAMA0", SYMLINK+="kvmd-hid"
|
||||
@@ -31,7 +31,7 @@ def init(
|
||||
) -> Tuple[argparse.ArgumentParser, List[str], Section]:
|
||||
|
||||
args_parser = argparse.ArgumentParser(prog=prog, description=description, add_help=add_help)
|
||||
args_parser.add_argument("-c", "--config", dest="config_path", default="/etc/kvmd/kvmd.yaml", metavar="<file>",
|
||||
args_parser.add_argument("-c", "--config", dest="config_path", default="/etc/kvmd/main.yaml", metavar="<file>",
|
||||
help="Set config file path")
|
||||
args_parser.add_argument("-o", "--set-options", dest="set_options", default=[], nargs="+",
|
||||
help="Override config options list (like sec/sub/opt=value)")
|
||||
|
||||
Reference in New Issue
Block a user