Init
This commit is contained in:
commit
515df425f1
21
usr/share/initramfs-tools/hooks/yggdrasil
Executable file
21
usr/share/initramfs-tools/hooks/yggdrasil
Executable file
@ -0,0 +1,21 @@
|
||||
#!/bin/sh
|
||||
PREREQ=""
|
||||
prereqs()
|
||||
{
|
||||
echo "$PREREQ"
|
||||
}
|
||||
|
||||
case $1 in
|
||||
prereqs)
|
||||
prereqs
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
|
||||
. /usr/share/initramfs-tools/hook-functions
|
||||
# Begin real processing below this line
|
||||
|
||||
manual_add_modules tun
|
||||
copy_exec /usr/bin/yggdrasil /sbin/yggdrasil
|
||||
copy_file "yggdrasil config" /etc/yggdrasil-initramfs/yggdrasil.conf /etc/yggdrasil.conf
|
||||
exit 0
|
20
usr/share/initramfs-tools/scripts/init-bottom/yggdrasil
Executable file
20
usr/share/initramfs-tools/scripts/init-bottom/yggdrasil
Executable file
@ -0,0 +1,20 @@
|
||||
#!/bin/sh
|
||||
PREREQ=""
|
||||
prereqs()
|
||||
{
|
||||
echo "$PREREQ"
|
||||
}
|
||||
|
||||
case $1 in
|
||||
prereqs)
|
||||
prereqs
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
|
||||
. /scripts/functions
|
||||
|
||||
log_begin_msg "Stopping yggdrasil"
|
||||
PID=$(cat /run/yggdrasil.pid 2> /dev/null)
|
||||
kill $PID
|
||||
log_end_msg
|
21
usr/share/initramfs-tools/scripts/init-premount/yggdrasil
Executable file
21
usr/share/initramfs-tools/scripts/init-premount/yggdrasil
Executable file
@ -0,0 +1,21 @@
|
||||
#!/bin/sh
|
||||
PREREQ=""
|
||||
prereqs()
|
||||
{
|
||||
echo "$PREREQ"
|
||||
}
|
||||
|
||||
case $1 in
|
||||
prereqs)
|
||||
prereqs
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
|
||||
. /scripts/functions
|
||||
log_begin_msg "Starting yggdrasil"
|
||||
modprobe tun
|
||||
mkdir /var/run
|
||||
exec /sbin/yggdrasil -useconffile /etc/yggdrasil.conf &
|
||||
echo $! >/run/yggdrasil.pid
|
||||
log_end_msg
|
Loading…
Reference in New Issue
Block a user