optimierungen
This commit is contained in:
parent
e2f14bfc48
commit
af0904b92b
1 changed files with 41 additions and 19 deletions
60
arch-install
60
arch-install
|
@ -60,7 +60,7 @@ function minimalinstallation() {
|
||||||
cp /opt/${repo}/aurinstall.sh ${mountpoint}/usr/bin/aurinstaller
|
cp /opt/${repo}/aurinstall.sh ${mountpoint}/usr/bin/aurinstaller
|
||||||
chmod +x ${mountpoint}/usr/bin/aurinstaller
|
chmod +x ${mountpoint}/usr/bin/aurinstaller
|
||||||
|
|
||||||
if [ "${name}" != "noinstall" ]; then
|
if [ "y" != "noinstall" ]; then
|
||||||
echo "${name}´s_PC-${version}" > ${mountpoint}/etc/hostname
|
echo "${name}´s_PC-${version}" > ${mountpoint}/etc/hostname
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -173,6 +173,12 @@ function partionierenohneswap() {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function partitioniereonepartition() {
|
||||||
|
wipefs -a -f ${device}3
|
||||||
|
sgdisk -a 2048 -n 3:: -c 3:"Linux filesystem" -t 3:8300 ${device}
|
||||||
|
formatencrypt
|
||||||
|
}
|
||||||
|
|
||||||
function usbkeyinstallation() {
|
function usbkeyinstallation() {
|
||||||
mkdir -p /mnt/usb-stick
|
mkdir -p /mnt/usb-stick
|
||||||
mount ${usbkeydevice} /mnt/usb-stick
|
mount ${usbkeydevice} /mnt/usb-stick
|
||||||
|
@ -275,14 +281,14 @@ function installation {
|
||||||
|
|
||||||
#boot
|
#boot
|
||||||
echo "format"
|
echo "format"
|
||||||
if [ "${name}" != "noinstall" ]; then
|
if [ "y" != "noinstall" ] && [ "${skipbootpartition}" != "y" ]; then
|
||||||
mkfs.vfat -F 32 ${device}${efipartitionnummer}
|
mkfs.vfat -F 32 ${device}${efipartitionnummer}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#root
|
#root
|
||||||
if [ "${dateisystem}" == "btrfs" ]; then
|
if [ "${dateisystem}" == "btrfs" ]; then
|
||||||
#mkfs.btrfs -f -L p_arch ${device}2
|
#mkfs.btrfs -f -L p_arch ${device}2
|
||||||
if [ "${name}" != "noinstall" ]; then
|
if [ "y" != "noinstall" ]; then
|
||||||
btrfsformat #btrfs
|
btrfsformat #btrfs
|
||||||
fi
|
fi
|
||||||
subvolume #btrfs
|
subvolume #btrfs
|
||||||
|
@ -290,12 +296,12 @@ function installation {
|
||||||
elif [ "${dateisystem}" == "ext4" ]; then
|
elif [ "${dateisystem}" == "ext4" ]; then
|
||||||
echo "confirm with y"
|
echo "confirm with y"
|
||||||
if [ "${verschluesselung}" == "y" ]; then
|
if [ "${verschluesselung}" == "y" ]; then
|
||||||
if [ "${name}" != "noinstall" ]; then
|
if [ "y" != "noinstall" ]; then
|
||||||
mkfs.ext4 -L p_arch ${deviceluks} #ext4
|
mkfs.ext4 -L p_arch ${deviceluks} #ext4
|
||||||
fi
|
fi
|
||||||
mount ${deviceluks} ${mountpoint}
|
mount ${deviceluks} ${mountpoint}
|
||||||
else
|
else
|
||||||
if [ "${name}" != "noinstall" ]; then
|
if [ "y" != "noinstall" ]; then
|
||||||
mkfs.ext4 -L p_arch ${device}${rootpartitionnummer} #ext4
|
mkfs.ext4 -L p_arch ${device}${rootpartitionnummer} #ext4
|
||||||
fi
|
fi
|
||||||
mount ${device}${rootpartitionnummer} ${mountpoint}
|
mount ${device}${rootpartitionnummer} ${mountpoint}
|
||||||
|
@ -305,14 +311,14 @@ function installation {
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#swap
|
#swap
|
||||||
if [ "${name}" != "noinstall" ]; then
|
if [ "y" != "noinstall" ]; then
|
||||||
if [ "${swap}" != "n" ]; then
|
if [ "${swap}" != "n" ]; then
|
||||||
mkswap -L p_swap ${device}${swappartitionnummer}
|
mkswap -L p_swap ${device}${swappartitionnummer}
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#installation
|
#installation
|
||||||
if [ "${name}" != "noinstall" ]; then
|
if [ "y" != "noinstall" ]; then
|
||||||
if [ "${offline}" != "n" ]
|
if [ "${offline}" != "n" ]
|
||||||
then
|
then
|
||||||
if [ -f /run/archiso/bootmnt/arch/$(uname -m)/airootfs.sfs ]; then
|
if [ -f /run/archiso/bootmnt/arch/$(uname -m)/airootfs.sfs ]; then
|
||||||
|
@ -431,7 +437,7 @@ function installation {
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#makeswapfile+fstab
|
#makeswapfile+fstab
|
||||||
if [ "${name}" != "noinstall" ]; then
|
if [ "y" != "noinstall" ]; then
|
||||||
if [ "${swapfile}" == "y" ]; then
|
if [ "${swapfile}" == "y" ]; then
|
||||||
if [ "${dateisystem}" == "btrfs" ]; then
|
if [ "${dateisystem}" == "btrfs" ]; then
|
||||||
makebtrfsswapfile
|
makebtrfsswapfile
|
||||||
|
@ -441,18 +447,18 @@ function installation {
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "${name}" != "noinstall" ]; then
|
if [ "y" != "noinstall" ]; then
|
||||||
#hostname
|
#hostname
|
||||||
echo "${name}´s_PC-${version}" > ${mountpoint}/etc/hostname
|
echo "${name}´s_PC-${version}" > ${mountpoint}/etc/hostname
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "${name}" != "noinstall" ]; then
|
if [ "y" != "noinstall" ]; then
|
||||||
if [ "${usbsecret}" == "y" ]; then
|
if [ "${usbsecret}" == "y" ]; then
|
||||||
usbsecret
|
usbsecret
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "${name}" != "noinstall" ]; then
|
if [ "y" != "noinstall" ]; then
|
||||||
if [ "${usbkey}" == "y" ]; then
|
if [ "${usbkey}" == "y" ]; then
|
||||||
usbkeyinstallation
|
usbkeyinstallation
|
||||||
fi
|
fi
|
||||||
|
@ -663,7 +669,7 @@ function subvolume() {
|
||||||
btrfsmount 1
|
btrfsmount 1
|
||||||
|
|
||||||
# Create
|
# Create
|
||||||
if [ "${name}" != "noinstall" ]; then
|
if [ "y" != "noinstall" ]; then
|
||||||
mkdir -p /mnt/btrfs-root/__snapshot
|
mkdir -p /mnt/btrfs-root/__snapshot
|
||||||
mkdir -p /mnt/btrfs-root/__current
|
mkdir -p /mnt/btrfs-root/__current
|
||||||
btrfs subvolume create /mnt/btrfs-root/__current/ROOT
|
btrfs subvolume create /mnt/btrfs-root/__current/ROOT
|
||||||
|
@ -925,6 +931,18 @@ function abfrage() {
|
||||||
[[ -z "${autostart}" ]] && autostart=n
|
[[ -z "${autostart}" ]] && autostart=n
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
read -p "Do you want a extra parameter for the installation? : [skipbootpartition/noinstall/debug] " extraparameter
|
||||||
|
for wort in ${extraparameter}
|
||||||
|
do
|
||||||
|
((x++))
|
||||||
|
echo "$x"
|
||||||
|
echo "$wort"
|
||||||
|
if [ "$wort" == "skipbootpartition" ]; then skipbootpartition=y; fi
|
||||||
|
if [ "$wort" == "noinstall" ]; then noinstall=y; fi
|
||||||
|
if [ "$wort" == "debug" ]; then debug=y; fi
|
||||||
|
|
||||||
|
done
|
||||||
|
|
||||||
# Ausgaben
|
# Ausgaben
|
||||||
|
|
||||||
# Dateisystem
|
# Dateisystem
|
||||||
|
@ -1096,7 +1114,7 @@ abfrage
|
||||||
|
|
||||||
secureumount
|
secureumount
|
||||||
|
|
||||||
if [ "${name}" == "debug" ] || [ "${name}" == "noinstall" ]
|
if [ "y" == "debug" ] || [ "y" == "noinstall" ]
|
||||||
then
|
then
|
||||||
echo "DEBEUG-MODUS"
|
echo "DEBEUG-MODUS"
|
||||||
echo "If no more commands are required, simply press enter"
|
echo "If no more commands are required, simply press enter"
|
||||||
|
@ -1114,7 +1132,7 @@ fi
|
||||||
#
|
#
|
||||||
echo "A purge stops the chance of installing on the system."
|
echo "A purge stops the chance of installing on the system."
|
||||||
echo "It may take a while!"
|
echo "It may take a while!"
|
||||||
if [ "${name}" != "noinstall" ]; then
|
if [ "y" != "noinstall" ]; then
|
||||||
dd if=/dev/zero of=${device} bs=64M count=10 status=progress
|
dd if=/dev/zero of=${device} bs=64M count=10 status=progress
|
||||||
fi
|
fi
|
||||||
#
|
#
|
||||||
|
@ -1122,8 +1140,10 @@ if [ "${Partition}" == "uefi" ]
|
||||||
then
|
then
|
||||||
echo "Partitions with UEFI"
|
echo "Partitions with UEFI"
|
||||||
|
|
||||||
if [ "${name}" != "noinstall" ]; then
|
if [ "y" != "noinstall" ]; then
|
||||||
if [ "${swap}" != "n" ]; then
|
if [ "${skipbootpartition}" == "y" ]; then
|
||||||
|
partitioniereonepartition
|
||||||
|
elif [ "${swap}" != "n" ]; then
|
||||||
echo "Create additional swap partition"
|
echo "Create additional swap partition"
|
||||||
partionierenmitswap
|
partionierenmitswap
|
||||||
else
|
else
|
||||||
|
@ -1156,8 +1176,10 @@ then
|
||||||
echo "Finished"
|
echo "Finished"
|
||||||
elif [ "${Partition}" == "bios" ]; then
|
elif [ "${Partition}" == "bios" ]; then
|
||||||
echo "Partitions with MBR"
|
echo "Partitions with MBR"
|
||||||
if [ "${name}" != "noinstall" ]; then
|
if [ "y" != "noinstall" ]; then
|
||||||
if [ "${swap}" != "n" ]; then
|
if [ "${skipbootpartition}" == "y" ]; then
|
||||||
|
partitioniereonepartition
|
||||||
|
elif [ "${swap}" != "n" ]; then
|
||||||
echo "Create additional swap partition"
|
echo "Create additional swap partition"
|
||||||
partionierenmitswap
|
partionierenmitswap
|
||||||
else
|
else
|
||||||
|
@ -1197,7 +1219,7 @@ fi
|
||||||
|
|
||||||
# benutzerwechsel
|
# benutzerwechsel
|
||||||
|
|
||||||
if [ "${name}" != "noinstall" ] && [ -z "${installationsfehler}" ]; then
|
if [ "y" != "noinstall" ] && [ -z "${installationsfehler}" ]; then
|
||||||
#arch-chroot ${mountpoint} usermod -l "${name}" user1
|
#arch-chroot ${mountpoint} usermod -l "${name}" user1
|
||||||
#arch-chroot ${mountpoint} usermod -d /home/"${name}" -m "${name}"
|
#arch-chroot ${mountpoint} usermod -d /home/"${name}" -m "${name}"
|
||||||
arch-chroot ${mountpoint} chfn -f "${name}" user1
|
arch-chroot ${mountpoint} chfn -f "${name}" user1
|
||||||
|
|
Loading…
Reference in a new issue