background start
This commit is contained in:
parent
bdc29d114c
commit
54c276fb9e
13
bin/rc
13
bin/rc
|
@ -3,8 +3,21 @@
|
|||
rc.hostname() { hostname "$cfg_hostname"; }
|
||||
|
||||
rc.services() {
|
||||
local service_name bg_start
|
||||
|
||||
for i in "${cfg_services[@]}"; do
|
||||
[[ "$i" =~ ^@ ]] && {
|
||||
service_name="${i##*@}"
|
||||
bg_start='1'
|
||||
} || {
|
||||
service_name="$i"
|
||||
}
|
||||
|
||||
[[ "$bg_start" ]] && {
|
||||
"${cfg_initscripts_dir}/$i" "$1" & true
|
||||
} || {
|
||||
"${cfg_initscripts_dir}/$i" "$1"
|
||||
}
|
||||
done
|
||||
}
|
||||
|
||||
|
|
|
@ -4,5 +4,5 @@ export PATH='/usr/local/bin:/usr/bin'
|
|||
cfg_initscripts_dir='/etc/rc.d'
|
||||
|
||||
cfg_hostname='generic'
|
||||
cfg_services=( 'fsck' 'udev' 'mount' 'syslog-ng' 'crond' 'network' 'dhcpcd' 'sshd' 'rc.local' )
|
||||
cfg_services=( 'fsck' 'udev' 'mount' 'syslog-ng' 'crond' 'network' 'dhcpcd' '@sshd' 'rc.local' )
|
||||
# cfg_modules=()
|
||||
|
|
Loading…
Reference in New Issue
Block a user