blackcurrant
V2EX  ›  macOS

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

  •  
  •   blackcurrant · Jan 9, 2023 · 1839 views
    This topic created in 1243 days ago, the information mentioned may be changed or developed.
    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 replies    2023-01-09 20:06:33 +08:00
    churchmice
        1
    churchmice  
       Jan 9, 2023
    Try running `launchctl bootstrap` as root for richer errors.
    neilyoone
        2
    neilyoone  
       Jan 9, 2023
    Try running `launchctl bootstrap` as root for richer errors.
    blackcurrant
        3
    blackcurrant  
    OP
       Jan 9, 2023
    ```
    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 似乎能够载入,但是并没有运行。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   907 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 29ms · UTC 20:00 · PVG 04:00 · LAX 13:00 · JFK 16:00
    ♥ Do have faith in what you're doing.