From: xf0r3m Date: Sat, 25 Apr 2026 09:32:19 +0000 (+0200) Subject: Dostosowanie do wersji 3.0 cz.3. Usunięcie błędów w narzędziach. Dodanie możliwości... X-Git-Url: https://gitweb.morketsmerke.org/?a=commitdiff_plain;h=090acbb32bd4aba10f45eae7308ffee77238bfde;p=immudex.git Dostosowanie do wersji 3.0 cz.3. Usunięcie błędów w narzędziach. Dodanie możliwości zmiany rozmiaru partycji w immudex-install bez potrzeby edycji kodu. --- diff --git a/tools/bin/immudex-meteo b/tools/bin/immudex-meteo index 9a0c6c0..9fbefb5 100755 --- a/tools/bin/immudex-meteo +++ b/tools/bin/immudex-meteo @@ -23,7 +23,7 @@ function help() { } function version() { - echo "immudex-meteo 1.0"; + echo "immudex-meteo 1.0-1"; echo; echo "Copyright (C) 2026 morketsmerke.org"; echo "This is free software; see the source for copying conditions. There is NO"; @@ -34,7 +34,7 @@ function version() { if [ "$1" ]; then case $1 in - "--short") curl wttr.in/${2}?format=2\&lang=pl;; + "--short") curl wttr.in/${2}?0\&lang=pl;; "--long") curl wttr.in/${2}?lang=pl;; "--micro") curl wttr.in/${2}?format=4;; "--help") help; exit 0;; diff --git a/tools/bin/immudex-pl b/tools/bin/immudex-pl index fa9e196..e6dce63 100755 --- a/tools/bin/immudex-pl +++ b/tools/bin/immudex-pl @@ -2,6 +2,7 @@ GREEN="\e[32m"; RED="\e[31m"; +YELLOW="\e[33m"; ENDCOLOR="\e[0m"; SYSTEM_CC=$(echo $LANG | cut -c 1-2); @@ -33,7 +34,7 @@ function help() { } function version() { - echo "immudex-pl 1.0"; + echo "immudex-pl 1.0-1"; echo; echo "Copyright (C) 2026 morketsmerke.org"; echo "This is free software; see the source for copying conditions. There is NO"; @@ -106,15 +107,20 @@ if [ "$file" ]; then echo "Getting high quality audio stream format..."; audio=$(yt-dlp --list-formats $link 2>/dev/null | grep 'audio only' | grep "high" | sed -n '1p' | awk '{printf $1}'); if [ ! "$audio" ]; then - echo "No audio stream found...[ ${RED}DEAD${ENDCOLOR} ]"; - exit 1; + echo -e "No audio stream found...[ ${RED}FAILED${ENDCOLOR} ]"; + echo -e "There is no separate audio stream...[ ${YELLOW}FINE${ENDCOLOR} ]"; + #exit 1; else echo -e "Getting high quality audio stream format...[ ${GREEN}OK${ENDCOLOR} ]"; fi else echo -e "Getting audio format based on your locales...[ ${GREEN}OK${ENDCOLOR} ]"; fi - fmat="--ytdl-format=${video}+${audio}"; + if [ ! "$audio" ]; then + fmat="--ytdl-format=${video}"; + else + fmat="--ytdl-format=${video}+${audio}"; + fi echo "MPV is starting up..."; mpv $fmat $link > /dev/null 2>&1 & MPVPID=$! diff --git a/tools/man/immudex-install.1.gz b/tools/man/immudex-install.1.gz index 13ad22f..960837c 100644 Binary files a/tools/man/immudex-install.1.gz and b/tools/man/immudex-install.1.gz differ diff --git a/tools/man/immudex-meteo.1.gz b/tools/man/immudex-meteo.1.gz index 179dcbd..ff80026 100644 Binary files a/tools/man/immudex-meteo.1.gz and b/tools/man/immudex-meteo.1.gz differ diff --git a/tools/man/immudex-pl.1.gz b/tools/man/immudex-pl.1.gz index 80506df..e75ec4a 100644 Binary files a/tools/man/immudex-pl.1.gz and b/tools/man/immudex-pl.1.gz differ diff --git a/tools/sbin/immudex-install b/tools/sbin/immudex-install index fc07577..f89411d 100755 --- a/tools/sbin/immudex-install +++ b/tools/sbin/immudex-install @@ -13,25 +13,28 @@ function help() { echo "GB. It would happens. More space in this partition is also needed for"; echo "upgrades tasks. So if your image is bigger than 2 GiB, you need to "; echo "change size of this partition before you start instalation."; - echo "Recomended size is 3 times the image size."; + echo "Recomended size is 3 times the image size. The partition size can be"; + echo "changed via below described option."; echo "This script requires superuser (root) privileges."; echo; - echo "Usage: immudex-install [--help] [--version]"; + echo "Usage: immudex-install [--partition-size=3G] [--help] [--version]"; echo; echo "Options:"; - echo " --help Print this message."; - echo " --version Print information about version, author and copyrights."; + echo " --partition-size=3G This option change a partition size with immudex image. Usefull for custom builds. By default it's 3GB."; + echo " --help Print this message."; + echo " --version Print information about version, author and copyrights."; echo; echo "Examples:"; - echo " immudex-install Standard execution, instalation immudex LiveCD on computer hard disk."; - echo " immudex-install --help Print this message."; - echo " immudex-install --version Print information about version, author and copyrights."; + echo " immudex-install Standard execution, instalation immudex LiveCD on computer hard disk."; + echo " immudex-install --partition-size=6G Run install script for custom immudex image build."; + echo " immudex-install --help Print this message."; + echo " immudex-install --version Print information about version, author and copyrights."; echo; echo "Report bugs to "; } function version() { - echo "immudex-install 1.0"; + echo "immudex-install 1.1"; echo; echo "Copyright (C) 2026 morketsmerke.org"; echo "This is free software; see the source for copying conditions. There is NO"; @@ -46,6 +49,10 @@ if [ "$1" ]; then help; elif [ "$1" = "--version" ]; then version; + elif $(echo $1 | grep -q "--partition-size"); then + idxPartSize=$(echo $1 | cut -d "=" -f2); + else + idxPartSize="3G"; fi else if [ $UID -ne 0 ]; then @@ -90,7 +97,7 @@ if $(sudo efibootmgr > /dev/null 2>&1); then parted /dev/$disk mklabel msdos > /dev/null 2>&1; parted /dev/$disk mkpart primary 1 101M > /dev/null 2>&1; parted /dev/$disk set 1 boot on > /dev/null 2>&1; - parted /dev/$disk mkpart primary 101M 3G > /dev/null 2>&1; + parted /dev/$disk mkpart primary 101M $idxPartSize > /dev/null 2>&1; if $(echo $disk | egrep -qo "mmc|nvme"); then disk="${disk}p"; fi @@ -150,7 +157,7 @@ else dd if=/dev/zero bs=1M of=/dev/$disk count=1 2> /dev/null parted /dev/$disk mklabel msdos > /dev/null 2>&1; - parted /dev/$disk mkpart primary 1 3G > /dev/null 2>&1; + parted /dev/$disk mkpart primary 1 $idxPartSize > /dev/null 2>&1; parted /dev/$disk set 1 boot on > /dev/null 2>&1; if $(echo $disk | egrep -qo "mmc|nvme"); then disk="${disk}p"; fi diff --git a/versions/base.sh b/versions/base.sh index 6760007..2d390ed 100644 --- a/versions/base.sh +++ b/versions/base.sh @@ -66,7 +66,8 @@ cp -vv ~/immudex/tools/sbin/* /usr/local/sbin; chown root:root /usr/local/sbin/*; chmod 544 /usr/local/sbin/*; -cp -vv ~/immudex/tools/misc/motd.conf /etc/motd.conf; +mkdir /usr/share/doc/immudex-motd; +cp -vv ~/immudex/tools/misc/motd.conf /usr/share/doc/immudex-motd/motd.conf; cp -vv ~/immudex/tools/misc/immudex-hostname.service /etc/systemd/system; systemctl enable immudex-hostname.service; @@ -90,7 +91,7 @@ tar -xf ~/immudex/files/mozilla.tgz -C /etc/skel; cat >> /etc/bash.bashrc << EOL if [ ! -f /tmp/.motd ]; then -/usr/local/bin/immudex-motd2 +/usr/local/bin/immudex-motd touch /tmp/.motd; fi EOL