V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
blackcurrant
V2EX  ›  macOS

外置硬盘上的任何脚本都无法用 launchctl load

  •  
  •   blackcurrant · 2023-01-09 18:07:58 +08:00 · 898 次点击
    这是一个创建于 444 天前的主题,其中的信息可能已经有所发展或是发生改变。
    me@mac /Volumes/T7Shield/test$ ls
    testdaemon.plist testdaemon.sh
    
    me@mac /Volumes/T7Shield/test$ launchctl load testdaemon.plist
    Load failed: 5: Input/output error
    Try running `launchctl bootstrap` as root for richer errors.
    
    me@mac /Volumes/T7Shield/test$ plutil testdaemon.plist
    testdaemon.plist: OK
    

    如果把脚本移动到系统盘就能正常 load, 有人知道如何解决吗?

    3 条回复    2023-01-09 20:06:33 +08:00
    churchmice
        1
    churchmice  
       2023-01-09 18:09:04 +08:00
    Try running `launchctl bootstrap` as root for richer errors.
    neilyoone
        2
    neilyoone  
       2023-01-09 19:26:00 +08:00
    Try running `launchctl bootstrap` as root for richer errors.
    blackcurrant
        3
    blackcurrant  
    OP
       2023-01-09 20:06:33 +08:00
    ```
    mac@mac /Volumes/T7Shield/test$ launchctl bootstrap gui/501 testdaemon.plist
    Bootstrap failed: 5: Input/output error
    Try re-running the command as root for richer errors.

    me@mac /Volumes/T7Shield/test$ sudo launchctl bootstrap gui/501 testdaemon.plist

    me@mac /Volumes/T7Shield/test$ launchctl list|grep test
    - 78 testdaemon

    me@mac /Volumes/T7Shield/test$ sudo launchctl kickstart -k gui/501/testdaemon

    me@mac /Volumes/T7Shield/test$ ps -ef|grep test
    501 20046 7610 0 8:02PM ttys005 0:00.00 grep --color=always test
    ```

    用 sudo launchctl bootstrap 似乎能够载入,但是并没有运行。
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   5257 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 28ms · UTC 09:18 · PVG 17:18 · LAX 02:18 · JFK 05:18
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.