LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 08-29-2005, 10:22 AM   #1
bensky
LQ Newbie
 
Registered: Feb 2005
Posts: 4

Rep: Reputation: 0
creating rpm problem


Hi all,

the following is my problem:

I want to create an rpm installing a software, which includes a scripot which starts the software as a service.

So I create the following files:

/etc/init.d/mysoftware_service
/etc/rc5.d/S32mysoftware_service
/etc/rc1.d/K32mysoftware_service

This works perfectly, but now I have the problem, that maybe an entry with the number S32 or K32 in the rc.X directory already exists. In this case I want to create the links with a different number, e.g.:

/etc/rc5.d/S99mysoftware_service
/etc/rc6.d/K99mysoftware_service

But how can I check in the rpm script if the S32xxx already exists and react accordingly to that.

My Spec file looks like the following:

Ben Sky
Code:
 Summary:  Install myprogram 
 %define version 1.0 
 Copyright: bensky 
 Name: my_installer_rpm  
 Provides:  my_installer_rpm 
 Release: 1
  Version: %{version} 

  %description 
  something    

  %files 
  %defattr(-,root,root)  
  /etc/rc.d/init.d/mysoftware_service
  /etc/rc.d/rc5.d/S32mysoftware_service
  /etc/rc.d/rc6.d/K32mysoftware_service
Thanks for any help or input
 
Old 08-29-2005, 10:54 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
why would you need a unique number? akk the number serves to do is force a loose alphanumeric order, so it just runs each script in turn. the numbers do not need to be unique in the slightest.
 
Old 08-30-2005, 01:35 AM   #3
bensky
LQ Newbie
 
Registered: Feb 2005
Posts: 4

Original Poster
Rep: Reputation: 0
Thanks, I thought the number must be unique!
If this is not the case, my problem is solved!

Ben
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Creating an installable RPM smart_sagittari Linux - General 5 09-08-2005 11:28 AM
problem creating rpm captainfreedom Linux - Newbie 0 05-31-2004 04:42 PM
Problem with creating rpm for navidia kernel and glx for Fedora core lak Linux - Software 7 11-30-2003 07:05 AM
Creating an RPM database Null Linux - Software 6 03-20-2003 06:09 PM
Creating RPM. jayakrishnan Linux - General 1 04-10-2002 12:31 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 03:12 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration