Welcome to Soft32 Linux Forums!
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

program need to restart before it works

 
   Soft32 Home -> Linux -> Partner Relationship Management RSS
Next:  cannot get kickstart to work  
Author Message
wong_powah

External


Since: Apr 18, 2007
Posts: 7



(Msg. 1) Posted: Fri Nov 16, 2007 7:56 am
Post subject: program need to restart before it works
Archived from groups: linux>redhat>rpm (more info?)

After my program (service) is installed and started on FC6, it does
not work the first time. After it is restarted, then it works.
How to fix this problem?

The spec file is like this:
....
%install
%define RPM_BUILD_DIR /usr/src/redhat/BUILD/%{name}-%{version}
rm -rf $RPM_BUILD_ROOT

mkdir -p $RPM_BUILD_ROOT/%{_prefix}/
mkdir -p $RPM_BUILD_ROOT/%{_bindirprefix}/
install $RPM_BUILD_DIR/%{name}-%{sourced_version}/myprog
$RPM_BUILD_ROOT/%{_prefix}/myprog
mkdir -p $RPM_BUILD_ROOT/etc/rc.d/init.d
install $RPM_BUILD_DIR/%{name}-%{sourced_version}/myprog.init
$RPM_BUILD_ROOT/etc/rc.d/init.d/myprog

%post
chkconfig --add myprog
chkconfig --level 0123456 myprog on

%preun
chkconfig --del myprog
Back to top
Login to vote
Daniel Ganek

External


Since: Jul 02, 2007
Posts: 5



(Msg. 2) Posted: Mon Nov 19, 2007 4:27 am
Post subject: Re: program need to restart before it works [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

wong_powah.RemoveThis@yahoo.ca wrote:
> After my program (service) is installed and started on FC6, it does
> not work the first time. After it is restarted, then it works.
> How to fix this problem?
>
> The spec file is like this:
> ...
> %install
> %define RPM_BUILD_DIR /usr/src/redhat/BUILD/%{name}-%{version}
> rm -rf $RPM_BUILD_ROOT
>
> mkdir -p $RPM_BUILD_ROOT/%{_prefix}/
> mkdir -p $RPM_BUILD_ROOT/%{_bindirprefix}/
> install $RPM_BUILD_DIR/%{name}-%{sourced_version}/myprog
> $RPM_BUILD_ROOT/%{_prefix}/myprog
> mkdir -p $RPM_BUILD_ROOT/etc/rc.d/init.d
> install $RPM_BUILD_DIR/%{name}-%{sourced_version}/myprog.init
> $RPM_BUILD_ROOT/etc/rc.d/init.d/myprog
>
> %post
> chkconfig --add myprog
> chkconfig --level 0123456 myprog on
>
> %preun
> chkconfig --del myprog
>

Your postinstall scriptlet needs to start your program; e.g.,

service myprog on

/dan
Back to top
Login to vote
Display posts from previous:   
Related Topics:
help - I installed rpm4.0.6 and now nothing works! - Hi I have been trying to install the driver for a new 3com gigabit NIC (3c2000). When I tried to build the driver I go...

Where to find php-4.3.0 or above for RH 8.0? - I have been searching for the referenced php rpm for RH 8 and the latest I could find was 4.2.2.17 which is a long way....

cd & dvd nero burning for RedHat8.0 - Hello, Is there an alternative burning programm available for rh8.0 which is looking and working the same as the well....

Can not install libdvdread.so.2 using libdvdread-0.9.4-fr3.. - Hi folks, since I am a newbie in linux, I think I need your help now :-) I am trying to install dvd::rip on my..

RPM - Installation failed!?! - Always I try to install a RPM package that i downloaded from the RedHat Website the system only ask me for the 'root'..

kernel install fails. - I've been trying to install the latest kernel from redhat but get this... su - rpm -iv kernel-2.4.20-20.9.athlon.rpm ....
       Soft32 Home -> Linux -> Partner Relationship Management All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Categories:
 Windows
  Linux
 Mac
 PDA


[ Contact us | Terms of Service/Privacy Policy ]