Solved

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

Posted on 2014-10-27
3
774 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 500 total points
Comment Utility
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_
Comment Utility
Thanks for showing me a new technique versus what I inherited from previous colleagues.
0
 
LVL 7

Expert Comment

by:Stampel
Comment Utility
welcome :)
0

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Join & Write a Comment

Daily system administration tasks often require administrators to connect remote systems. But allowing these remote systems to accept passwords makes these systems vulnerable to the risk of brute-force password guessing attacks. Furthermore there ar…
The purpose of this article is to demonstrate how we can use conditional statements using Python.
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
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.

772 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now