小编Mar*_*tin的帖子

run-parts(8) 实用程序的目的

至少在基于 Debian 的系统下,debianutils包中有一个run-parts实用程序,可用于各种脚本。例如在 /etc/X11/Xsession.conf 中。它将运行在目录中找到的所有可执行文件。为什么需要运行部件而可以与选项或实用程序一起使用?另外,什么是可执行文件?看起来它不是简单地检查文件权限:find-permtestrun-parts

# run-parts --list --lsbsysinit /etc/X11/Xsession.d | tail -1
/etc/X11/Xsession.d/90x11-common_ssh-agent
# ls -l /etc/X11/Xsession.d/90x11-common_ssh-agent
-rw-r--r-- 1 root root 629 2010-11-02 23:17 /etc/X11/Xsession.d/90x11-common_ssh-agent
# head /etc/X11/Xsession.d/90x11-common_ssh-agent
# $Id: 90x11-common_ssh-agent 305 2005-07-03 18:51:43Z dnusinow $

# This file is sourced by Xsession(5), not executed.

STARTSSH=
SSHAGENT=/usr/bin/ssh-agent
SSHAGENTARGS=

if has_option use-ssh-agent; then
  if [ -x "$SSHAGENT" ] && [ -z "$SSH_AUTH_SOCK" ] \
# 
Run Code Online (Sandbox Code Playgroud)

bash bash-script

6
推荐指数
1
解决办法
7613
查看次数

标签 统计

bash ×1

bash-script ×1