• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1228
  • Last Modified:

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

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
edwards_
Asked:
edwards_
  • 2
1 Solution
 
StampelCommented:
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
 
edwards_Author Commented:
Thanks for showing me a new technique versus what I inherited from previous colleagues.
0
 
StampelCommented:
welcome :)
0

Featured Post

Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now