linux-live/initramfs/init

39 lines
688 B
Bash

#!/bin/sh
# Initial script for Linux Live Kit
# Author: Tomas M <http://www.linux-live.org/>
MEMORYDIR=/memory
UNIONDIR=/union
DATADIR=/mnt/data
BUNDLESDIR=/mnt/bundles
export PATH=.:/:/usr/sbin:/usr/bin:/sbin:/bin
. /.config
. /livekitlib
header "Starting $LIVEKITNAME ..."
init_proc
init_devs
init_aufs
init_zram
init_union $MEMORYDIR $UNIONDIR
# find data dir with filesystem bundles
DATA="$(find_data $LIVEKITNAME $DATADIR)"
# copy to RAM if needed
# add data to union
union_append_bundles "$DATA" "$BUNDLESDIR" "$UNIONDIR"
# create empty fstab
fstab_create "$UNIONDIR"
header "Live Kit phase ends, starting $LIVEKITNAME"
change_root "$UNIONDIR"
header "!!ERROR!!"
/bin/sh