Skip to content

Commit

Permalink
s/live/full/gi
Browse files Browse the repository at this point in the history
  • Loading branch information
noptrix committed Dec 29, 2020
1 parent e2ba1a0 commit 4a96711
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 2,583 deletions.
42 changes: 21 additions & 21 deletions blackarch-install
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ INSTALL_MODE=''

# install modes
INSTALL_REPO='1'
INSTALL_LIVE_ISO='2'
INSTALL_FULL_ISO='2'
INSTALL_BLACKMAN='3'

# chosen locale
Expand Down Expand Up @@ -174,7 +174,7 @@ WLAN_PASSPHRASE=''
# check boot mode
BOOT_MODE=''

# check type of ISO (live? netinst?)
# check type of ISO (Full? netinst?)
ISO_TYPE=''


Expand Down Expand Up @@ -270,7 +270,7 @@ check_iso_type()
{
if [ "$(which dnsspider 2> /dev/null)" ]
then
ISO_TYPE='live'
ISO_TYPE='full'
else
ISO_TYPE='net'
fi
Expand Down Expand Up @@ -349,21 +349,21 @@ ask_install_mode()
while
[ "$INSTALL_MODE" != "$INSTALL_REPO" ] && \
[ "$INSTALL_MODE" != "$INSTALL_BLACKMAN" ] && \
[ "$INSTALL_MODE" != "$INSTALL_LIVE_ISO" ]
[ "$INSTALL_MODE" != "$INSTALL_FULL_ISO" ]
do
title 'Welcome to the BlackArch Linux installer!'
wprintf '[+] Available installation modes:'
printf "\n
1. Install from BlackArch repository (online)
2. Install from BlackArch Live-ISO (offline)
2. Install from BlackArch Full-ISO (offline)
3. Install from sources using blackman (online)\n\n"
wprintf '[?] Choose an installation mode: '
read -r INSTALL_MODE
if [ "$INSTALL_MODE" = "$INSTALL_LIVE_ISO" ]
if [ "$INSTALL_MODE" = "$INSTALL_FULL_ISO" ]
then
if [ "$ISO_TYPE" = "net" ]
then
err 'WTF, Live-ISO mode with Netinstall? Nope!'
err 'WTF, Full-ISO mode with Netinstall? Nope!'
ask_install_mode
INSTALL_MODE=''
fi
Expand Down Expand Up @@ -1431,7 +1431,7 @@ setup_initramfs()
cp -f "$BI_PATH/data/etc/mkinitcpio.conf" "$CHROOT/etc/mkinitcpio.conf"
cp -fr "$BI_PATH/data/etc/mkinitcpio.d" "$CHROOT/etc/"

if [ "$INSTALL_MODE" = "$INSTALL_LIVE_ISO" ]
if [ "$INSTALL_MODE" = "$INSTALL_FULL_ISO" ]
then
cp /run/archiso/bootmnt/blackarch/boot/x86_64/vmlinuz-linux \
"$CHROOT/boot/vmlinuz-linux"
Expand Down Expand Up @@ -1526,7 +1526,7 @@ EOF

uuid="$(lsblk -o UUID "$ROOT_PART" | sed -n 2p)"

if [ "$INSTALL_MODE" != "$INSTALL_LIVE_ISO" ]
if [ "$INSTALL_MODE" != "$INSTALL_FULL_ISO" ]
then
chroot $CHROOT pacman -S grub --noconfirm --overwrite='*' --needed \
> $VERBOSE 2>&1
Expand Down Expand Up @@ -1725,13 +1725,13 @@ setup_extra_packages()
# perform system base setup/configurations
setup_base_system()
{
if [ "$INSTALL_MODE" = "$INSTALL_LIVE_ISO" ]
if [ "$INSTALL_MODE" = "$INSTALL_FULL_ISO" ]
then
dump_live_iso
dump_full_iso
sleep_clear 1
fi

if [ "$INSTALL_MODE" != "$INSTALL_LIVE_ISO" ]
if [ "$INSTALL_MODE" != "$INSTALL_FULL_ISO" ]
then
pass_mirror_conf # copy mirror list to chroot env

Expand Down Expand Up @@ -1775,7 +1775,7 @@ setup_base_system()
sleep_clear 2
fi

if [ "$INSTALL_MODE" != "$INSTALL_LIVE_ISO" ]
if [ "$INSTALL_MODE" != "$INSTALL_FULL_ISO" ]
then
reinitialize_keyring
sleep_clear 1
Expand Down Expand Up @@ -2257,21 +2257,21 @@ update_user_groups()
}


# dump data from the live-iso
dump_live_iso()
# dump data from the full-iso
dump_full_iso()
{
live_dirs='/bin /sbin /etc /home /lib /lib64 /opt /root /srv /usr /var /tmp'
full_dirs='/bin /sbin /etc /home /lib /lib64 /opt /root /srv /usr /var /tmp'
total_size=0 # no cheat

title 'BlackArch Linux Setup'

wprintf '[+] Dumping data from Live-ISO. Grab a coffee and pop shells!'
wprintf '[+] Dumping data from Full-ISO. Grab a coffee and pop shells!'
printf "\n\n"

wprintf '[+] Fetching total size to transfer, please wait...'
printf "\n"

for d in $live_dirs
for d in $full_dirs
do
part_size=$(du -sm "$d" 2> /dev/null | awk '{print $1}')
((total_size+=part_size))
Expand All @@ -2292,7 +2292,7 @@ dump_live_iso()
wprintf "[+] Installation done!\n"

# clean up files
wprintf '[+] Cleaning Live Environment files, please wait...'
wprintf '[+] Cleaning Full Environment files, please wait...'
sed -i 's/Storage=volatile/#Storage=auto/' ${CHROOT}/etc/systemd/journald.conf
rm -rf "$CHROOT/etc/udev/rules.d/81-dhcpcd.rules"
rm -rf "$CHROOT/etc/systemd/system/"{choose-mirror.service,pacman-init.service,etc-pacman.d-gnupg.mount,[email protected]}
Expand Down Expand Up @@ -2475,7 +2475,7 @@ main()
ask_hostname
sleep_clear 0

if [ "$INSTALL_MODE" != "$INSTALL_LIVE_ISO" ]
if [ "$INSTALL_MODE" != "$INSTALL_FULL_ISO" ]
then
get_net_ifs
ask_net_conf_mode
Expand Down Expand Up @@ -2541,7 +2541,7 @@ main()
sleep_clear 1

# blackarch Linux
if [ "$INSTALL_MODE" != "$INSTALL_LIVE_ISO" ]
if [ "$INSTALL_MODE" != "$INSTALL_FULL_ISO" ]
then
setup_blackarch
sleep_clear 1
Expand Down
5 changes: 5 additions & 0 deletions docs/TODO
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ ChangeLog and TODO list for blackarch-installer
[ ] update: add help text for each section if feasible


===> 1.2.20

[x] s/live/full/gi


===> 1.2.19

[x] add default mkinitcpio.* stuff
Expand Down
Loading

0 comments on commit 4a96711

Please sign in to comment.