wip
This commit is contained in:
parent
50c02e4b17
commit
0c02fe3f41
2 changed files with 7 additions and 26 deletions
12
unbox.sh
12
unbox.sh
|
@ -23,9 +23,9 @@ function unbox_outer_stage(){
|
|||
source repo/entry.sh
|
||||
|
||||
mkdir -p target
|
||||
export TARGET=$(pwd)/target
|
||||
|
||||
if type -t first_stage > /dev/null; then
|
||||
export TARGET=$(pwd)/target
|
||||
first_stage
|
||||
else
|
||||
echo first stage not found
|
||||
|
@ -45,10 +45,12 @@ function unbox_outer_stage(){
|
|||
mkdir -p target/root/unbox
|
||||
mount -o bind . target/root/unbox
|
||||
$CHROOT target /root/unbox/unbox.sh unbox_inner_stage
|
||||
sleep 0.5
|
||||
mount | grep target | awk '{print $3}'| sort -r | while read LINE; do
|
||||
umount -l $LINE;
|
||||
done
|
||||
|
||||
if type -t post_install_stage > /dev/null; then
|
||||
post_install_stage
|
||||
else
|
||||
echo no post_install_stage found
|
||||
fi
|
||||
exit 0
|
||||
}
|
||||
|
||||
|
|
21
utils.sh
21
utils.sh
|
@ -5,24 +5,3 @@ function prefix_time(){
|
|||
echo "["$(date)"] "$LINE
|
||||
done
|
||||
}
|
||||
|
||||
function one_token_per_line(){
|
||||
for L in $1; do
|
||||
echo $L
|
||||
done
|
||||
}
|
||||
|
||||
function block_devices(){
|
||||
#lsblk -fPpo NAME,FSTYPE,LABEL,UUID,FSAVAIL,MOUNTPOINT
|
||||
lsblk -frpno NAME
|
||||
}
|
||||
|
||||
function foo(){
|
||||
|
||||
while read LINE; do
|
||||
(
|
||||
export $LINE
|
||||
echo "> "$NAME
|
||||
)
|
||||
done
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue