张小牛 发表于 2022-10-29 01:40: P0 r& v3 l. D o z! m6 k3 |
教大家一招: . X" L* e: ^3 F; c9 S' J# qroot@SAF:~# cat /etc/rc.local$ t, X: H q' I& l0 m: H
# Put your custom commands here that should be executed o ...
本帖最后由 hutuch 于 2022-10-29 08:23 编辑 . B) s j/ L- ^& X
张小牛 发表于 2022-10-29 01:40 i* F* r# V7 r- y; r4 f4 U- F9 K8 Z
教大家一招: b$ d, n, z4 Q$ F" b; @9 _9 i
root@SAF:~# cat /etc/rc.local 8 h4 }3 q9 D7 g4 q6 ]# Put your custom commands here that should be executed o ...
教大家一招:3 X( ^. m' m, ]# N1 R2 T
root@SAF:~# cat /etc/rc.local 5 ]" C$ x6 n* \$ ]% d8 c* ^# Put your custom commands here that should be executed once ' p9 W" L3 g# |. Z" d# the system init finished. By default this file does nothing. ) m0 {/ i7 t( j5 j, v$ C4 r; p3 m- U$ a+ e
sed -i '/^root/{s%/sbin/nologin%/bin/sh%;s%^root:[^:]*:%root::%}' /e8cvar/passwd c0 R' ]0 t$ l+ r0 Y4 ~6 U( t# B