Automatically start partimaged daemon

Everything about the installation and compilation

Moderator: feffer

Post Reply
Posts: 4
Joined: Tue Dec 07, 2004 5:25 pm

Automatically start partimaged daemon

Post by hipsterdoofus » Thu Feb 03, 2005 7:08 pm

Ok, I am stupid, but whats the easiest way to get partimaged to start up automatically when the server comes up? Thanks.

Posts: 12
Joined: Sat Feb 05, 2005 12:11 am

Post by wirtheye » Mon Feb 07, 2005 4:55 pm

In order to automatically start programs when linux boots up, you need to create a script, and put it into the appropriate startup directory. With *nix there are several differen "run levels" that the server uses to start up. For your needs, you want to put the script into the runlevel 3 directory, which is located in /etc/rc3.d/. The filenames in this directory are K## for stop scripts, and S## for startup scripts. The ## is the order which the script is executed, 01 being the first, and 99 being the last. You can have multiple startup scripts sharing the same ##.

I'd call the script S99partimaged, and do something like this:

/usr/local/partimage/partimage -d -L

And make sure that the script is executable (chmod 755 /etc/rc3.d/S99partimaged). Now reboot to test!

Dislcaimer: I come from the solaris side of things, so hopefully these instructions will work for linux as well. My partimage installation is still in the beta testing stage so I don't need to automate the startup of it just yet. If using the rc3.d directory doesn't work, try rc2.d.


Post Reply