zoukankan      html  css  js  c++  java
  • systemd管理开机自启动

    Using a separate service
    Tip: These steps can be automated by installing the systemd-numlockonttyAUR package and enabling the numLockOnTty service.

    First create a script to set the numlock on relevant TTYs:

    /usr/local/bin/numlock
    
    #!/bin/bash
    
    for tty in /dev/tty{1..6}
    do
        /usr/bin/setleds -D +num < "$tty";
    done
    
    

    Once the script is created, you will need to make it executable. Otherwise the script cannot run.

    Then create and enable a systemd service:

    /etc/systemd/system/numlock.service
    
    [Unit]
    Description=numlock
    
    [Service]
    ExecStart=/usr/local/bin/numlock
    StandardInput=tty
    RemainAfterExit=yes
    
    [Install]
    WantedBy=multi-user.target
    
  • 相关阅读:
    [手游新项目历程]-36- error: stray ‘357’ in program
    广告学(一)
    VMware的Unity模式
    poj3709
    poj1849
    bzoj2007
    bzoj3209
    bzoj2466,poj1222
    bzoj1016
    bzoj2186
  • 原文地址:https://www.cnblogs.com/DXGG-Bond/p/13206426.html
Copyright © 2011-2022 走看看