|
|
@@ -0,0 +1,32 @@
|
|
|
+#!/bin/sh
|
|
|
+# runs on system startup
|
|
|
+# 2026-05-08 08:50 created by niujiuru
|
|
|
+
|
|
|
+# 设置系统主频
|
|
|
+[ -w /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor ] && \
|
|
|
+ echo userspace > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
|
|
|
+
|
|
|
+[ -w /sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed ] && \
|
|
|
+ echo 528000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed
|
|
|
+
|
|
|
+# usbfs:内存值
|
|
|
+[ -w /sys/module/usbcore/parameters/usbfs_memory_mb ] && \
|
|
|
+ echo 500 > /sys/module/usbcore/parameters/usbfs_memory_mb
|
|
|
+
|
|
|
+# 拉起eth0网卡
|
|
|
+for i in 1 2 3 4 5; do
|
|
|
+ [ -d /sys/class/net/eth0 ] && /sbin/ip link set eth0 up && break
|
|
|
+ sleep 1
|
|
|
+done
|
|
|
+
|
|
|
+# FTP:创建用户
|
|
|
+[ -x /opt/yfkj/local-startup.service/create-ftp-user.sh ] && /opt/yfkj/local-startup.service/create-ftp-user.sh
|
|
|
+
|
|
|
+# 关闭无用服务
|
|
|
+systemctl stop rpcbind.socket
|
|
|
+systemctl stop rpcbind
|
|
|
+systemctl stop check_upgrade
|
|
|
+
|
|
|
+systemctl disable rpcbind.socket
|
|
|
+systemctl disable rpcbind
|
|
|
+systemctl disable check_upgrade
|