1
0
Fork 0
mirror of https://github.com/pygos/build.git synced 2024-11-25 04:20:41 +01:00

Add pygos specific init setup to init package

Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
This commit is contained in:
David Oberhollenzer 2018-04-21 19:39:48 +02:00
parent 390c1e6a15
commit 1389c74f95
9 changed files with 54 additions and 1 deletions

View file

@ -26,7 +26,7 @@ deploy() {
make DESTDIR="$DEPLOY" install-strip make DESTDIR="$DEPLOY" install-strip
mkdir -p "$DEPLOY/etc/init.d" cp -r ${SCRIPTDIR}/pkg/${PKGNAME}/{etc,lib,share} "$DEPLOY"
if [ -e "$SCRIPTDIR/board/$BOARD/INIT" ]; then if [ -e "$SCRIPTDIR/board/$BOARD/INIT" ]; then
source "$SCRIPTDIR/board/$BOARD/INIT" source "$SCRIPTDIR/board/$BOARD/INIT"

View file

@ -0,0 +1 @@
/share/init/mountusr

View file

@ -0,0 +1 @@
/share/init/tmpfsrun

View file

@ -0,0 +1 @@
/share/init/tmpfsvar

1
pkg/init/etc/initd.env Normal file
View file

@ -0,0 +1 @@
PATH=/bin

View file

@ -0,0 +1,21 @@
#!/bin/sh
lower=/cfg/preserve/${1}
upper=/cfg/overlay/${1}
work=/cfg/overlay/${1}_work
target=${2}
if [ ! -d "$target" ]; then
exit
fi
if [ -d "$lower" ]; then
if [ -d "$upper" ]; then
mkdir -p "$work"
mount -t overlay overlay \
-olowerdir=${lower},upperdir=${upper},workdir=${work} \
${target}
else
mount --bind "$lower" "$target"
fi
fi

View file

@ -0,0 +1,5 @@
description "mount /usr"
type wait
target boot
before vfs
exec /lib/libexec/init/overlay.sh usr /usr

View file

@ -0,0 +1,11 @@
description "mount /run"
type wait
target boot
before vfs
after tmpfsvar
exec {
mount -t tmpfs none /run
mkdir /run/lock -m 0755
ln -s /run /var/run
ln -s /run/lock /var/lock
}

View file

@ -0,0 +1,12 @@
description "mount /var"
type wait
target boot
before vfs
exec {
mount -t tmpfs none /var
mkdir /var/log -m 0755
mkdir /var/spool -m 0755
mkdir /var/lib -m 0755
mkdir /var/tmp -m 0755
/lib/libexec/init/overlay.sh var_lib /var/lib
}