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:
parent
390c1e6a15
commit
1389c74f95
9 changed files with 54 additions and 1 deletions
|
@ -26,7 +26,7 @@ deploy() {
|
|||
|
||||
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
|
||||
source "$SCRIPTDIR/board/$BOARD/INIT"
|
||||
|
|
1
pkg/init/etc/init.d/mountusr
Symbolic link
1
pkg/init/etc/init.d/mountusr
Symbolic link
|
@ -0,0 +1 @@
|
|||
/share/init/mountusr
|
1
pkg/init/etc/init.d/tmpfsrun
Symbolic link
1
pkg/init/etc/init.d/tmpfsrun
Symbolic link
|
@ -0,0 +1 @@
|
|||
/share/init/tmpfsrun
|
1
pkg/init/etc/init.d/tmpfsvar
Symbolic link
1
pkg/init/etc/init.d/tmpfsvar
Symbolic link
|
@ -0,0 +1 @@
|
|||
/share/init/tmpfsvar
|
1
pkg/init/etc/initd.env
Normal file
1
pkg/init/etc/initd.env
Normal file
|
@ -0,0 +1 @@
|
|||
PATH=/bin
|
21
pkg/init/lib/libexec/init/overlay.sh
Executable file
21
pkg/init/lib/libexec/init/overlay.sh
Executable 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
|
5
pkg/init/share/init/mountusr
Normal file
5
pkg/init/share/init/mountusr
Normal file
|
@ -0,0 +1,5 @@
|
|||
description "mount /usr"
|
||||
type wait
|
||||
target boot
|
||||
before vfs
|
||||
exec /lib/libexec/init/overlay.sh usr /usr
|
11
pkg/init/share/init/tmpfsrun
Normal file
11
pkg/init/share/init/tmpfsrun
Normal 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
|
||||
}
|
12
pkg/init/share/init/tmpfsvar
Normal file
12
pkg/init/share/init/tmpfsvar
Normal 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
|
||||
}
|
Loading…
Reference in a new issue