zoukankan      html  css  js  c++  java
  • debian 9、10开启rc.local

    新建vi /etc/rc.local内容2行:

    #!/bin/sh -e
    
    exit 0
    

    chmod u+x /etc/rc.local

    开机启动

    root@debian10:~# systemctl enable rc.local  这一步不成功,实际上这一步也不影响reboot后,rc.local的开机启动
    
    The unit files have no installation config (WantedBy=, RequiredBy=, Also=,
    Alias= settings in the [Install] section, and DefaultInstance= for template
    units). This means they are not meant to be enabled using systemctl.
    
    Possible reasons for having this kind of units are:
    • A unit may be statically enabled by being symlinked from another unit's
      .wants/ or .requires/ directory.
    • A unit's purpose may be to act as a helper for some other unit which has
      a requirement dependency on it.
    • A unit may be started when needed via activation (socket, path, timer,
      D-Bus, udev, scripted systemctl call, ...).
    • In case of template units, the unit is meant to be enabled with some
      instance name specified
    

    reboot后,rc.local正常开机启动

    实际上rc.local.servie和rc-local.service是一个服务

  • 相关阅读:
    Django第一天
    约束条件 表之间的关系
    数据类型
    初始vue
    JQ事件和事件对象
    Jquery的属性操作和DOM操作
    浏览器对象BOM
    Swiper实现全屏视觉差轮播
    Swiper开篇
    JSON
  • 原文地址:https://www.cnblogs.com/weihua2020/p/14083820.html
Copyright © 2011-2022 走看看