Skip to content

Commit

Permalink
Do not try to delete img file twice
Browse files Browse the repository at this point in the history
Move README.txt to msdos part
Use -R not -r with cp
  • Loading branch information
sonertari committed Jul 6, 2021
1 parent c9109f4 commit 644a414
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
9 changes: 3 additions & 6 deletions meta/createimg
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ mkdir $ROOT_PATH/$SITE_DIR
cd $ROOT_PATH/$SITE_DIR
doas rm -rf *
for site in $SITE_CONTENTS; do
cp -r $ROOT_PATH/meta/$site .
cp -R $ROOT_PATH/meta/$site .
done
cp -R $ROOT_PATH/openbsd/$INSTALL_SETS_PATH/firmware ./etc/
echo "set tty fb0" > ./etc/boot.conf
Expand All @@ -120,10 +120,7 @@ rm SHA256

echo "Creating image: $IMG_FILE"

rm $IMG_FILE

cd $ROOT_PATH/$CD_PATH
echo "$VOL_ID\n$SYS_ID\n$APP_ID\n$PUBLISH_ID\n$PREP_ID" > README.txt

# All sizes are in sectors
MSDOSSTART=32768
Expand All @@ -143,13 +140,12 @@ IMG_SIZE=$(($FS_SIZE + $FFSSTART))
echo "Image size $IMG_SIZE sectors"

cd $ROOT_PATH
rm $IMG_FILE

doas umount ./img_ffs
doas umount ./img_msdos
doas vnconfig -u vnd0

rm $IMG_FILE

# 1 sector = 512 bytes
# SECURITY: Do not seek, write zeros
#dd if=/dev/zero of=$IMG_FILE bs=512 count=0 seek=$IMG_SIZE
Expand All @@ -176,6 +172,7 @@ doas mount -o-l /dev/vnd0i ./img_msdos
doas cp -R -L -v $ROOT_PATH/$CD_PATH/* ./img_ffs/

doas cp -R -v openbsd/$INSTALL_SETS_PATH/BOOT/* ./img_msdos
echo "$VOL_ID\n$SYS_ID\n$APP_ID\n$PUBLISH_ID\n$PREP_ID" > ./img_msdos/README.txt

doas umount ./img_ffs
doas umount ./img_msdos
Expand Down
2 changes: 1 addition & 1 deletion meta/createiso
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ mkdir $ROOT_PATH/$SITE_DIR
cd $ROOT_PATH/$SITE_DIR
doas rm -rf *
for site in $SITE_CONTENTS; do
cp -r $ROOT_PATH/meta/$site .
cp -R $ROOT_PATH/meta/$site .
done
doas chown -R root:wheel *
tar czhf $SITE_FILE $SITE_CONTENTS
Expand Down

0 comments on commit 644a414

Please sign in to comment.