Answers:
听起来您是在指 run-parts
NAME
run-parts - run scripts or programs in a directory
SYNOPSIS
run-parts [--test] [--verbose] [--report] [--lsbsysinit] [--regex=RE]
[--umask=umask] [--arg=argument] [--exit-on-error] [--help] [--version]
[--list] [--reverse] [--] DIRECTORY
run-parts -V
DESCRIPTION
run-parts runs all the executable files named within constraints
described below, found in directory directory. Other files and direc‐
tories are silently ignored.
If neither the --lsbsysinit option nor the --regex option is given then
the names must consist entirely of ASCII upper- and lower-case letters,
ASCII digits, ASCII underscores, and ASCII minus-hyphens.
If the --lsbsysinit option is given, then the names must not end in
.dpkg-old or .dpkg-dist or .dpkg-new or .dpkg-tmp, and must belong to
one or more of the following namespaces: the LANANA-assigned namespace
(^[a-z0-9]+$); the LSB hierarchical and reserved namespaces
(^_?([a-z0-9_.]+-)+[a-z0-9]+$); and the Debian cron script namespace
(^[a-zA-Z0-9_-]+$).
If the --regex option is given, the names must match the custom
extended regular expression specified as that option's argument.
Files are run in the lexical sort order (according to the C/POSIX
locale character collation rules) of their names unless the --reverse
option is given, in which case they are run in the opposite order.
/etc/rc.*
),网络管理器辅助脚本,X11
启动,暂停恢复过程....
我不知道,这种方法/ hack是否可以解决您的问题。但是,我认为如果我答对了,这将起作用。
[feddy@localhost ~]$ mkdir test
[feddy@localhost ~]$ cd test
[feddy@localhost test]$ ls
[feddy@localhost test]$ vi 0001-ko.sh
[feddy@localhost test]$ cp 0001-ko.sh 0002-ko.sh
[feddy@localhost test]$ cp 0001-ko.sh 0004-ko.sh
[feddy@localhost test]$ cp 0001-ko.sh 0005-ko file.sh
[feddy@localhost test]$ cp 0001-ko.sh 0008-ko.sh
[feddy@localhost test]$ ls
0001-ko.sh 0002-ko.sh 0004-ko.sh 0005-ko file.sh 0008-ko.sh
[feddy@localhost test]$ for i in *
> do
> bash "$i"
> done
file 0001-ko.sh
file 0002-ko.sh
file 0004-ko.sh
file 0005-ko file.sh
file 0008-ko.sh
[feddy@localhost test]$
要么
$ find . -iname "*.sh"|while read f; do bash "$f"; done
file ./0001-ko1.sh
file ./0002-ko1.sh
file ./0005-ko1 file.sh
file ./0005-ko1.sh
您可以制作一个脚本并使用它来按顺序执行脚本(根据文件名中包含的数字,即xxxx-abcdef)在任何文件夹中。
如果我弄错了,请纠正我。
/etc/rc?.d
?