Skip to content

Commit

Permalink
Update fulloto.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
yuceltoluyag authored Aug 3, 2024
1 parent deee47a commit 05e7e5f
Showing 1 changed file with 6 additions and 13 deletions.
19 changes: 6 additions & 13 deletions fulloto.sh
Original file line number Diff line number Diff line change
Expand Up @@ -259,15 +259,6 @@ check_disk_format() {
fi
}

check_disk_format() {
if mount | grep -q "/mnt"; then
print "Disk zaten biçimlendirilmiş ve monte edilmiş, bu adımlar atlanacak."
return 0
else
return 1
fi
}

mount_existing_partitions() {
local disk=$1
print "Mevcut bölümler monte ediliyor: $disk."
Expand All @@ -278,6 +269,7 @@ mount_existing_partitions() {
}

run_arch_chroot() {
local disk=$1
arch-chroot /mnt /bin/bash -e <<EOF
ln -sf /usr/share/zoneinfo/\$(curl -s http://ip-api.com/line?fields=timezone) /etc/localtime
hwclock --systohc
Expand All @@ -287,18 +279,19 @@ run_arch_chroot() {
if [ -d /sys/firmware/efi/efivars ]; then
grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=GRUB --recheck
else
grub-install --target=i386-pc $DISK --recheck --debug
grub-install --target=i386-pc $disk --recheck --debug
echo "GRUB_DISABLE_OS_PROBER=true" > /etc/default/grub
fi
grub-mkconfig -o /boot/grub/grub.cfg
useradd -m -g users -G wheel -s /bin/bash "$username"
echo "${username} ALL=(ALL:ALL) ALL" >> /etc/sudoers
echo "%wheel ALL=(ALL:ALL) ALL" >> /etc/sudoers
echo "%wheel ALL=(ALL:ALL) NOPASSWD: ALL" >> /etc/sudoers
echo "%wheel ALL=(ALL:ALL) ALL" >> /etc/sudoers
echo "%wheel ALL=(ALL:ALL) NOPASSWD: ALL" >> /etc/sudoers
EOF
}


main() {
show_logo
check_internet
Expand Down Expand Up @@ -330,7 +323,7 @@ main() {
set_user_and_password "$username"
set_user_and_password "root"

run_arch_chroot
run_arch_chroot "$DISK"

print "Pacman'da renk, animasyon ve paralel indirme etkinleştiriliyor."
sed -i 's/#Color/Color\nILoveCandy/;s/^#ParallelDownloads.*$/ParallelDownloads = 10/' /mnt/etc/pacman.conf
Expand Down

0 comments on commit 05e7e5f

Please sign in to comment.