Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

how to handle a RHEL7 systemd initial startup script after kickstart?

Posted on 2014-10-27
3
Medium Priority
?
1,164 Views
Last Modified: 2014-10-27
Prior to RHEL/Centos 7, I used a one time init.d script to perform some actions like installing non-rpm based third party software during the initial boot after the kickstart.  Once the script completed, it removed all traces of itself.  Now with the new systemd style startups, this doesn't appear to work.  Is there a way for systemd to execute the existing legacy SysV script automatically?  Secondly, is the better approach to handling this via creating a new unit file that can execute under either the multi-user or the graphical targets?
0
Comment
Question by:edwards_
  • 2
3 Comments
 
LVL 7

Accepted Solution

by:
Stampel earned 2000 total points
ID: 40406781
If you need to call a script on reboot, you may use crontab line beginning with @reboot, then clear the line from inside the script should not be that difficult. Or flag something so it would just run when you need.
0
 

Author Closing Comment

by:edwards_
ID: 40406940
Thanks for showing me a new technique versus what I inherited from previous colleagues.
0
 
LVL 7

Expert Comment

by:Stampel
ID: 40406998
welcome :)
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Linux users are sometimes dumbfounded by the severe lack of documentation on a topic. Sometimes, the documentation is copious, but other times, you end up with some obscure "it varies depending on your distribution" over and over when searching for …
I have written articles previously comparing SARDU and YUMI.  I also included a couple of lines about Easy2boot (easy2boot.com).  I have now been using, and enjoying easy2boot as my sole multiboot utility for some years and realize that it deserves …
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
Suggested Courses
Course of the Month9 days, 16 hours left to enroll

926 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question