Bug 1372487

Summary: What if the systemd is started from a wrapper script?
Product: [Fedora] Fedora Reporter: Peter Schiffer <pschiffe>
Component: oci-systemd-hookAssignee: Daniel Walsh <dwalsh>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 24CC: amurdaca, dwalsh, lsm5, nalin
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-09-02 20:28:58 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Peter Schiffer 2016-09-01 23:02:36 UTC
Description of problem:
I have a container running systemd inside, but before starting the systemd I'm running shell script, which prepares the environment, set up db, etc.. and in the end, it runs:
exec /usr/sbin/init

In this case, the oci-systemd-hook doesn't recognize the systemd inside of the container, because the CMD in Dockerfile is: CMD [ "/docker-cmd.sh" ]

Version-Release number of selected component (if applicable):
oci-systemd-hook-0.1.4-1.fc24.x86_64

Comment 1 Daniel Walsh 2016-09-02 10:20:46 UTC
If you change the name of your script to /init, I think it will work.
oci-systemd-hook is looking for executables named init or systemd

Comment 2 Peter Schiffer 2016-09-02 20:28:58 UTC
Thanks, renaming shell script to /init worked.