Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
OpenRC technical questions
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
MrMe01
Tux's lil' helper
Tux's lil' helper


Joined: 21 Jun 2013
Posts: 86

PostPosted: Sat Nov 28, 2015 12:42 pm    Post subject: OpenRC technical questions Reply with quote

Hi folks,

I'm not sure where the best place to ask such questions, please move as deemed necessary.

I'm building a set of custom images, the idea being is particular parts of the system are made into a custom, quickly deployable stage 4 like image. I'm starting with the base image, this is from GRUB 0.97 (for easy hacking purposes) to bash with a single root user and password. Other components will be extracted on to the filesystem as needed, the reason for this is quick bug fixing and easier management.

I want to build this image manually, so I know what files are in there and what I can and can't edit.

Here's what I have working,
Code:
boot / kernel and initramfs
sbin / switch_root and init and the few files that I've come across as nagged for or needed, like halt
etc / inittab and rc.conf (that's all that the system has asked for so far)
run / the folders RC has asked for
lib / the asked for parts for OpenRC so far.



lib/rc/sh/init.sh is where I run into the current issue. As this goes so fast into a (none) root: prompt, I have taken to recording the screen with my camera and playing it back slowly.

I get the error
Code:
 rc: unable to exec '/lib/rc/sh/init.sh' : No such file or directory'


I've looked at the script and given it functions.sh, but that doesn't change anything. Doing a ./init.sh in a fully booted environment (dual booting, install cloned to another partition) gives me
Code:
line 6: /sh/functions.sh: No such file or directory


What am I missing?
Back to top
View user's profile Send private message
MrMe01
Tux's lil' helper
Tux's lil' helper


Joined: 21 Jun 2013
Posts: 86

PostPosted: Sat Nov 28, 2015 12:46 pm    Post subject: Reply with quote

On my fully working install ./init.sh gives me the same error. Intriguing..
Back to top
View user's profile Send private message
MrMe01
Tux's lil' helper
Tux's lil' helper


Joined: 21 Jun 2013
Posts: 86

PostPosted: Sat Nov 28, 2015 1:13 pm    Post subject: Reply with quote

I've worked it out. /bin/sh. A true facepalm moment. First line of the sh script..
Back to top
View user's profile Send private message
krinn
Watchman
Watchman


Joined: 02 May 2003
Posts: 7079

PostPosted: Sat Nov 28, 2015 1:19 pm    Post subject: Reply with quote

Code:
. "$RC_LIBEXECDIR"/sh/functions.sh


Quote:
openrc-run sets the following environment variables for use in the ser‐
vice scripts:

RC_LIBEXECDIR The value of libexecdir which OpenRC was configured with
during build time.

So, you're not suppose to run init.sh, openrc-run is suppose to run it with the right value for RC_LIBEXECDIR.
Code:

LC_ALL=C ./init.sh
./init.sh: line 6: /sh/functions.sh: No such file or directory
RC_LIBEXECDIR="/lib/rc" init.sh
 * /proc is already mounted
Usage: checkpath [options] path1 [path2] [...]
...
openrc-run
openrc-run should not be run directly

and i suppose openrc is the one that should run openrc-run
Back to top
View user's profile Send private message
MrMe01
Tux's lil' helper
Tux's lil' helper


Joined: 21 Jun 2013
Posts: 86

PostPosted: Sun Nov 29, 2015 8:35 am    Post subject: Reply with quote

krinn wrote:
Code:
. "$RC_LIBEXECDIR"/sh/functions.sh


Quote:
openrc-run sets the following environment variables for use in the ser‐
vice scripts:

RC_LIBEXECDIR The value of libexecdir which OpenRC was configured with
during build time.

So, you're not suppose to run init.sh, openrc-run is suppose to run it with the right value for RC_LIBEXECDIR.
Code:

LC_ALL=C ./init.sh
./init.sh: line 6: /sh/functions.sh: No such file or directory
RC_LIBEXECDIR="/lib/rc" init.sh
 * /proc is already mounted
Usage: checkpath [options] path1 [path2] [...]
...
openrc-run
openrc-run should not be run directly

and i suppose openrc is the one that should run openrc-run


I'm not going that deep into it just yet. But thank you all the same :)
Back to top
View user's profile Send private message
MrMe01
Tux's lil' helper
Tux's lil' helper


Joined: 21 Jun 2013
Posts: 86

PostPosted: Sun Nov 29, 2015 8:47 am    Post subject: Reply with quote

I've got stuck with this, nothing I Google for gives me a clear answer. Any ideas?

http://s23.postimg.org/rai15h6kb/seg.png
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum