Problems with system() calls in Linux

Posted by Thomas on Stack Overflow See other posts from Stack Overflow or by Thomas
Published on 2010-06-16T18:03:32Z Indexed on 2010/06/16 20:52 UTC
Read the original article Hit count: 190

Filed under:
|
|

I'm working on a init for an initramfs in C++ for Linux. This script is used to unlock the DM-Crypt w/ LUKS encrypted drive, and set the LVM drives to be available.

Since I don't want to have to reimplement the functionality of cryptsetup and gpg I am using system calls to call the executables. Using a system call to call gpg works fine if I have the system fully brought up already (I already have a bash script based initramfs that works fine in bringing it up, and I use grub to edit the command line to bring it up using the old initramfs). However, in the initramfs it never even acts like it gets called. Even commands like system("echo BLAH"); fail.

So, does anyone have any input?

© Stack Overflow or respective owner

Related posts about c++

Related posts about linux