From e581e7ded75558751574393867eb24f9c78737b4 Mon Sep 17 00:00:00 2001 From: xf0r3m Date: Thu, 4 Jan 2024 07:40:30 +0100 Subject: [PATCH] =?utf8?q?Podzia=C5=82=20narz=C4=99dzi=20autorskich=20na?= =?utf8?q?=20zwyk=C5=82e=20(tools/bin)=20oraz=20wymagaj=C4=85ce=20uprawnie?= =?utf8?q?=C5=84=20administratora=20(tools/sbin)=20-=20Ustawienie=20u?= =?utf8?q?=C5=BCytkownik=C3=B3w=20cz.=202?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- tools/{ => bin}/idle-clic | 0 tools/{ => bin}/immudex-autostart-x4notes | 0 tools/{ => bin}/immudex-branch | 0 tools/{ => bin}/immudex-import-gpgkeys | 0 tools/{ => bin}/immudex-import-sshkeys | 0 tools/{ => bin}/immudex-meteo | 0 tools/{ => bin}/immudex-morketsmerke | 0 tools/{ => bin}/immudex-motd2 | 0 tools/{ => bin}/immudex-pl | 0 tools/{ => bin}/immudex-secured-firefox | 0 tools/{ => bin}/immudex-shoutcasts | 0 tools/{ => bin}/immudex-unlock-ds | 0 tools/{ => bin}/immudex-version | 0 tools/{ => bin}/immudex-ytplay | 0 tools/{ => bin}/library.sh | 0 tools/{ => bin}/sync.sh | 0 tools/immudex-create-media | 104 ---------------------- tools/{ => sbin}/immudex-crypt | 0 tools/{ => sbin}/immudex-hostname | 0 tools/{ => sbin}/immudex-install | 0 tools/{ => sbin}/immudex-padlock | 0 tools/{ => sbin}/immudex-upgrade | 0 22 files changed, 104 deletions(-) rename tools/{ => bin}/idle-clic (100%) rename tools/{ => bin}/immudex-autostart-x4notes (100%) rename tools/{ => bin}/immudex-branch (100%) rename tools/{ => bin}/immudex-import-gpgkeys (100%) rename tools/{ => bin}/immudex-import-sshkeys (100%) rename tools/{ => bin}/immudex-meteo (100%) rename tools/{ => bin}/immudex-morketsmerke (100%) rename tools/{ => bin}/immudex-motd2 (100%) rename tools/{ => bin}/immudex-pl (100%) rename tools/{ => bin}/immudex-secured-firefox (100%) rename tools/{ => bin}/immudex-shoutcasts (100%) rename tools/{ => bin}/immudex-unlock-ds (100%) rename tools/{ => bin}/immudex-version (100%) rename tools/{ => bin}/immudex-ytplay (100%) rename tools/{ => bin}/library.sh (100%) rename tools/{ => bin}/sync.sh (100%) delete mode 100755 tools/immudex-create-media rename tools/{ => sbin}/immudex-crypt (100%) rename tools/{ => sbin}/immudex-hostname (100%) rename tools/{ => sbin}/immudex-install (100%) rename tools/{ => sbin}/immudex-padlock (100%) rename tools/{ => sbin}/immudex-upgrade (100%) diff --git a/tools/idle-clic b/tools/bin/idle-clic similarity index 100% rename from tools/idle-clic rename to tools/bin/idle-clic diff --git a/tools/immudex-autostart-x4notes b/tools/bin/immudex-autostart-x4notes similarity index 100% rename from tools/immudex-autostart-x4notes rename to tools/bin/immudex-autostart-x4notes diff --git a/tools/immudex-branch b/tools/bin/immudex-branch similarity index 100% rename from tools/immudex-branch rename to tools/bin/immudex-branch diff --git a/tools/immudex-import-gpgkeys b/tools/bin/immudex-import-gpgkeys similarity index 100% rename from tools/immudex-import-gpgkeys rename to tools/bin/immudex-import-gpgkeys diff --git a/tools/immudex-import-sshkeys b/tools/bin/immudex-import-sshkeys similarity index 100% rename from tools/immudex-import-sshkeys rename to tools/bin/immudex-import-sshkeys diff --git a/tools/immudex-meteo b/tools/bin/immudex-meteo similarity index 100% rename from tools/immudex-meteo rename to tools/bin/immudex-meteo diff --git a/tools/immudex-morketsmerke b/tools/bin/immudex-morketsmerke similarity index 100% rename from tools/immudex-morketsmerke rename to tools/bin/immudex-morketsmerke diff --git a/tools/immudex-motd2 b/tools/bin/immudex-motd2 similarity index 100% rename from tools/immudex-motd2 rename to tools/bin/immudex-motd2 diff --git a/tools/immudex-pl b/tools/bin/immudex-pl similarity index 100% rename from tools/immudex-pl rename to tools/bin/immudex-pl diff --git a/tools/immudex-secured-firefox b/tools/bin/immudex-secured-firefox similarity index 100% rename from tools/immudex-secured-firefox rename to tools/bin/immudex-secured-firefox diff --git a/tools/immudex-shoutcasts b/tools/bin/immudex-shoutcasts similarity index 100% rename from tools/immudex-shoutcasts rename to tools/bin/immudex-shoutcasts diff --git a/tools/immudex-unlock-ds b/tools/bin/immudex-unlock-ds similarity index 100% rename from tools/immudex-unlock-ds rename to tools/bin/immudex-unlock-ds diff --git a/tools/immudex-version b/tools/bin/immudex-version similarity index 100% rename from tools/immudex-version rename to tools/bin/immudex-version diff --git a/tools/immudex-ytplay b/tools/bin/immudex-ytplay similarity index 100% rename from tools/immudex-ytplay rename to tools/bin/immudex-ytplay diff --git a/tools/library.sh b/tools/bin/library.sh similarity index 100% rename from tools/library.sh rename to tools/bin/library.sh diff --git a/tools/sync.sh b/tools/bin/sync.sh similarity index 100% rename from tools/sync.sh rename to tools/bin/sync.sh diff --git a/tools/immudex-create-media b/tools/immudex-create-media deleted file mode 100755 index 809d766..0000000 --- a/tools/immudex-create-media +++ /dev/null @@ -1,104 +0,0 @@ -#!/bin/bash - -GREEN="\e[32m"; -YELLOW="\e[33m"; -ENDCOLOR="\e[0m"; - -function help() { - echo "immudex-create-media - script used for write iso image to usb drive(mainly)"; - echo "@ 2023 morketsmerke.org"; - echo "Options:"; - echo " --i386-efi - creating 32-bit EFI usb drive with iso image"; - echo " (comapatible with immudex only iso images)"; - echo " --nuke - write 0 to 1st megabyte of disk"; - echo "Usage:"; - echo " $ create_media [--i386-efi] [--nuke] [iso_image]"; -} - -if [ "$1" ] && [ "$1" = "--i386-efi" ]; then target="i386-efi"; shift; fi -if [ "$1" ] && [ "$1" = "--nuke" ]; then target="nuke"; shift; fi -if [ "$1" ] && echo $1 | grep -Eq '/dev/(sd[a-z]|vd[a-z]|mmcblk[0-9])'; then - disk=$1; shift; -else - help; - exit 1; -fi -if [ ! "$target" ] || [ "$target" != "nuke" ]; then - if [ "$1" ] && file $1 | grep -q 'ISO 9660'; then - iso=$1; - else - help; - exit 1; - fi -fi - -if [ "$target" = "i386-efi" ]; then - echo -n "Writing zeros to 1st megabyte on disk..."; - sudo dd if=/dev/zero bs=1M of=$disk count=1 > /dev/null 2>&1; - if [ $? -eq 0 ]; then echo -e "[${GREEN}OK${ENDCOLOR}]"; fi - - echo -n "Creating MS-DOS partitionig scheme on disk..."; - sudo parted $disk mklabel msdos > /dev/null 2>&1; - if [ $? -eq 0 ]; then echo -e "[${GREEN}OK${ENDCOLOR}]"; fi - - echo -n "Creating FAT-32 partition..."; - sudo parted $disk mkpart primary fat32 1 100%Free > /dev/null 2>&1; - if [ $? -eq 0 ]; then echo -e "[${GREEN}OK${ENDCOLOR}]"; fi - - echo -n "Creating VFAT filesystem on partition..."; - sudo mkfs.vfat ${disk}1 > /dev/null 2>&1; - if [ $? -eq 0 ]; then echo -e "[${GREEN}OK${ENDCOLOR}]"; fi - - echo -n "Creating /mnt/usb directory..."; - sudo mkdir /mnt/usb > /dev/null 2>&1; - if [ $? -eq 0 ]; then echo -e "[${GREEN}OK${ENDCOLOR}]"; - else echo -e "[${YELLOW}Directory exist!${ENDCOLOR}]"; fi - - echo -n "Mounting VFAT partition on /mnt/usb..."; - sudo mount ${disk}1 /mnt/usb > /dev/null 2>&1; - if [ $? -eq 0 ]; then echo -e "[${GREEN}OK${ENDCOLOR}]"; fi - - echo -n "Instalation GRUB on disk..."; - sudo grub-install --target=i386-efi --efi-directory=/mnt/usb --boot-directory=/mnt/usb/boot --bootloader-id=boot --removable > /dev/null 2>&1; - if [ $? -eq 0 ]; then echo -e "[${GREEN}OK${ENDCOLOR}]"; fi - - echo -n "Creating /mnt/iso directory..."; - sudo mkdir /mnt/iso > /dev/null 2>&1; - if [ $? -eq 0 ]; then echo -e "[${GREEN}OK${ENDCOLOR}]"; - else echo -e "[${YELLOW}Directory exist!${ENDCOLOR}]"; fi - - echo -n "Mounting iso file on /mnt/iso..."; - sudo mount $iso /mnt/iso > /dev/null 2>&1; - if [ $? -eq 0 ]; then echo -e "[${GREEN}OK${ENDCOLOR}]"; fi - - echo -n "Copying grub config files to the disk..."; - sudo cp /mnt/iso/boot/grub/font.pf2 /mnt/usb/boot/grub > /dev/null 2>&1; - sudo cp /mnt/iso/boot/grub/grub.cfg /mnt/usb/boot/grub > /dev/null 2>&1; - if [ $? -eq 0 ]; then echo -e "[${GREEN}OK${ENDCOLOR}]"; fi - - echo -n "Copying immudex files to the disk..."; - sudo cp -r /mnt/iso/live /mnt/usb > /dev/null 2>&1; - if [ $? -eq 0 ]; then echo -e "[${GREEN}OK${ENDCOLOR}]"; fi - - echo -n "Creating empty DEBIAN file..."; - sudo touch /mnt/usb/DEBIAN > /dev/null 2>&1; - if [ $? -eq 0 ]; then echo -e "[${GREEN}OK${ENDCOLOR}]"; fi - - echo -n "Umounting all mounted filesystems..."; - sudo umount /mnt/* > /dev/null 2>&1; - if [ $? -eq 0 ]; then echo -e "[${GREEN}OK${ENDCOLOR}]"; fi - -elif [ "$target" = "nuke" ]; then - echo -n "Writing zeros to 1st megabyte on disk..."; - sudo dd if=/dev/zero bs=1M of=$disk count=1 > /dev/null 2>&1; - if [ $? -eq 0 ]; then echo -e "[${GREEN}OK${ENDCOLOR}]"; fi - -else - echo -n "Writing zeros to 1st megabyte on disk..."; - sudo dd if=/dev/zero bs=1M of=$disk count=1 > /dev/null 2>&1; - if [ $? -eq 0 ]; then echo -e "[${GREEN}OK${ENDCOLOR}]"; fi - - echo -n "Writing iso image to the disk..." - sudo dd if=$iso bs=1M of=$disk > /dev/null 2>&1; - if [ $? -eq 0 ]; then echo -e "[${GREEN}OK${ENDCOLOR}]"; fi -fi diff --git a/tools/immudex-crypt b/tools/sbin/immudex-crypt similarity index 100% rename from tools/immudex-crypt rename to tools/sbin/immudex-crypt diff --git a/tools/immudex-hostname b/tools/sbin/immudex-hostname similarity index 100% rename from tools/immudex-hostname rename to tools/sbin/immudex-hostname diff --git a/tools/immudex-install b/tools/sbin/immudex-install similarity index 100% rename from tools/immudex-install rename to tools/sbin/immudex-install diff --git a/tools/immudex-padlock b/tools/sbin/immudex-padlock similarity index 100% rename from tools/immudex-padlock rename to tools/sbin/immudex-padlock diff --git a/tools/immudex-upgrade b/tools/sbin/immudex-upgrade similarity index 100% rename from tools/immudex-upgrade rename to tools/sbin/immudex-upgrade -- 2.39.5