Compare commits
20 Commits
Author | SHA1 | Date | |
---|---|---|---|
815a66d808 | |||
f7336ae3e6 | |||
e2346fa32f | |||
ff7035cd22 | |||
4bd2566b04 | |||
0d67903acf | |||
96f5040dfe | |||
a48e6bc452 | |||
e64461d64c | |||
dde357c695 | |||
c750cb4c69 | |||
1af089d106 | |||
dcaafa8604 | |||
c3f9740332 | |||
81a7c96f7f | |||
89557b8e36 | |||
5d830cbae4 | |||
fb7c410e8a | |||
e4190bae83 | |||
6545189eb0 |
66
boot-mountpoint/migrate-mountpoint.sh
Executable file
66
boot-mountpoint/migrate-mountpoint.sh
Executable file
@@ -0,0 +1,66 @@
|
||||
#!/usr/bin/bash
|
||||
|
||||
# Output colors
|
||||
RED='\033[0;31m'
|
||||
GREEN='\033[0;32m'
|
||||
YELLOW='\033[1;33m'
|
||||
NC='\033[0m' # No Color
|
||||
|
||||
# Logging-Funktion
|
||||
log() {
|
||||
echo -e "${GREEN}[INFO]${NC} $1"
|
||||
}
|
||||
|
||||
warn() {
|
||||
echo -e "${YELLOW}[WARN]${NC} $1"
|
||||
}
|
||||
|
||||
error() {
|
||||
echo -e "${RED}[ERROR]${NC} $1"
|
||||
}
|
||||
|
||||
# Check for root privileges
|
||||
if [ "$EUID" -ne 0 ]; then
|
||||
echo "This script must be run as root"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Create /boot/firmware dir if it doesn't exist
|
||||
if [ ! -d /boot/firmware ]; then mkdir -p /boot/firmware; fi
|
||||
|
||||
# Enable extended globbing for pattern matching
|
||||
shopt -s extglob
|
||||
|
||||
# Copy all files from /boot to /boot/firmware and remove the originals
|
||||
log "Moving files to /boot/firmware..."
|
||||
rsync -av --remove-source-files /boot/ /boot/firmware/
|
||||
|
||||
# Update the mount point for /boot in fstab to /boot/firmware
|
||||
log "Updating fstab..."
|
||||
cp -a /etc/fstab /etc/fstab.bak # create backup
|
||||
sed -i 's|^\([^#].*\)[[:space:]]/boot[[:space:]]|\1 /boot/firmware |' /etc/fstab
|
||||
|
||||
# Sync cache and reboot the system to apply changes
|
||||
sync
|
||||
# prompt for reboot
|
||||
echo ""
|
||||
while true; do
|
||||
read -p "Möchtest du das System jetzt neustarten, um die Änderungen zu testen? (J/N): " choice
|
||||
case $choice in
|
||||
[Jj]* )
|
||||
warn "System will be rebooted in 3 seconds"
|
||||
sleep 2
|
||||
reboot
|
||||
;;
|
||||
[Nn]* )
|
||||
log "Neustart übersprungen."
|
||||
log "Bitte starte das System manuell neu, um die Änderungen zu testen."
|
||||
break
|
||||
;;
|
||||
* )
|
||||
warn "Bitte antworte mit J (Ja) oder N (Nein)."
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
exit 0
|
1
teil21/.gitignore
vendored
Normal file
1
teil21/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
*.bak
|
2
teil21/commandlist.txt
Normal file
2
teil21/commandlist.txt
Normal file
@@ -0,0 +1,2 @@
|
||||
s/Simpson/Thompson/
|
||||
s/Flanders/Flunders/
|
1
teil21/commands.txt
Normal file
1
teil21/commands.txt
Normal file
@@ -0,0 +1 @@
|
||||
echo "Hello" | sed 's/Hello/Bye/'
|
16
teil21/families.txt
Normal file
16
teil21/families.txt
Normal file
@@ -0,0 +1,16 @@
|
||||
Simpson, Marge
|
||||
Simpson, Homer
|
||||
Simpson, Maggie
|
||||
Simpson, Lisa
|
||||
Simpson, Bart
|
||||
|
||||
#FLANDERS-START
|
||||
Flanders, Maude
|
||||
Flanders, Ned
|
||||
Flanders, Rod
|
||||
Flanders, Todd
|
||||
#FLANDERS-END
|
||||
|
||||
Wiggum, Sarah
|
||||
Wiggum, Clancy
|
||||
Wiggum, Ralph
|
0
teil22/ebene0/0.txt
Normal file
0
teil22/ebene0/0.txt
Normal file
1
teil23/.gitignore
vendored
Normal file
1
teil23/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
*.bak
|
19
teil23/family_case.sh
Executable file
19
teil23/family_case.sh
Executable file
@@ -0,0 +1,19 @@
|
||||
#! /usr/bin/bash
|
||||
#Datei: teil23/family_case.sh
|
||||
|
||||
|
||||
|
||||
case ${1} in
|
||||
'Homer'|'Marge'|'Bart'|'Lisa') # Familie Simpson
|
||||
echo "Familie Simpson"
|
||||
;;
|
||||
'Ned'|'Maude'|'Todd'|'Rod') # Familie Flanders
|
||||
echo "Familie Flanders"
|
||||
;;
|
||||
'Clancy'|'Sarah'|'Ralph') # Familie Wiggum
|
||||
echo "Familie Wiggum"
|
||||
;;
|
||||
*) # default
|
||||
echo "unbekannte Familie"
|
||||
;;
|
||||
esac
|
12
teil23/family_if.sh
Executable file
12
teil23/family_if.sh
Executable file
@@ -0,0 +1,12 @@
|
||||
#!/usr/bin/bash
|
||||
# Datei teil23/family_if.sh
|
||||
|
||||
if [[ "${1}" == "Homer" || "${1}" == "Marge" || "${1}" == "Bart" || "${1}" == "Lisa" ]]; then
|
||||
echo "Familie Simpson"
|
||||
elif [[ "${1}" == "Ned" || "${1}" == "Maude" || "${1}" == "Todd" || "${1}" == "Rod" ]]; then
|
||||
echo "Familie Flanders"
|
||||
elif [[ "${1}" == "Clancy" || "${1}" == "Sarah" || "${1}" == "Ralph" ]]; then
|
||||
echo "Familie Wiggum"
|
||||
else
|
||||
echo "unbekannte Familie"
|
||||
fi
|
2
teil24/.gitignore
vendored
Normal file
2
teil24/.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
*.bak
|
||||
|
Reference in New Issue
Block a user