2019-05-17 Fred Gleason <fredg@paravelsystems.com>

* Added '--end-startup-after-caed', '--end-startup-after-ripcd',
	'--end-startup-after-rdcatchd', '--end-startup-after-rdpadd',
	'--end-startup-after-rdpadengined', '--end-startup-after-rdvairplayd',
	and '--end-startup-after-rdrepld' command line switches to
	rdservice(8).
This commit is contained in:
Fred Gleason
2019-05-17 13:58:34 -04:00
parent 03b02fdbf8
commit e2fc500ec8
5 changed files with 139 additions and 2 deletions

View File

@@ -57,6 +57,8 @@ MainObject::MainObject(QObject *parent)
QString err_msg;
RDApplication::ErrorType err_type=RDApplication::ErrorOk;
svc_startup_target=MainObject::TargetAll;
//
// Open the syslog
//
@@ -80,6 +82,23 @@ MainObject::MainObject(QObject *parent)
exit(2);
}
//
// Process Startup Options
//
for(unsigned i=0;i<rda->cmdSwitch()->keys();i++) {
for(int j=0;j<MainObject::TargetAll;j++) {
MainObject::StartupTarget target=(MainObject::StartupTarget)j;
if(rda->cmdSwitch()->key(i)==TargetCommandString(target)) {
svc_startup_target=target;
rda->cmdSwitch()->setProcessed(i,true);
}
}
if(!rda->cmdSwitch()->processed(i)) {
fprintf(stderr,"rdservice: unknown command-line option\n");
exit(4);
}
}
//
// Exit Timer
//