startup.sh 963 B

1234567891011121314151617181920212223242526272829303132
  1. #!/bin/sh
  2. # runs on system startup
  3. # 2026-05-08 08:50 created by niujiuru
  4. # 设置系统主频
  5. [ -w /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor ] && \
  6. echo userspace > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
  7. [ -w /sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed ] && \
  8. echo 528000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed
  9. # usbfs:内存值
  10. [ -w /sys/module/usbcore/parameters/usbfs_memory_mb ] && \
  11. echo 500 > /sys/module/usbcore/parameters/usbfs_memory_mb
  12. # 拉起eth0网卡
  13. for i in 1 2 3 4 5; do
  14. [ -d /sys/class/net/eth0 ] && /sbin/ip link set eth0 up && break
  15. sleep 1
  16. done
  17. # FTP:创建用户
  18. [ -x /opt/yfkj/local-startup.service/create-ftp-user.sh ] && /opt/yfkj/local-startup.service/create-ftp-user.sh
  19. # 关闭无用服务
  20. systemctl stop rpcbind.socket
  21. systemctl stop rpcbind
  22. systemctl stop check_upgrade
  23. systemctl disable rpcbind.socket
  24. systemctl disable rpcbind
  25. systemctl disable check_upgrade