Compare commits
28
Commits
1.2
...
e265d95dd9
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e265d95dd9 | ||
|
|
0939c771f3 | ||
|
|
815a66d808 | ||
|
|
f7336ae3e6 | ||
|
|
e2346fa32f | ||
|
|
ff7035cd22 | ||
|
|
4bd2566b04 | ||
|
|
0d67903acf | ||
|
|
96f5040dfe | ||
|
|
a48e6bc452 | ||
|
|
e64461d64c | ||
|
|
dde357c695 | ||
|
|
c750cb4c69 | ||
|
|
1af089d106 | ||
|
|
dcaafa8604 | ||
|
|
c3f9740332 | ||
|
|
81a7c96f7f | ||
|
|
89557b8e36 | ||
|
|
5d830cbae4 | ||
|
|
fb7c410e8a | ||
|
|
e4190bae83 | ||
|
|
6545189eb0 | ||
|
|
4e375b5d08 | ||
|
|
2be3db4187 | ||
|
|
9dc5a2550c | ||
|
|
6f82b9eda4 | ||
|
|
28dada6046 | ||
|
|
deeb9080fe |
@@ -20,4 +20,12 @@ Dateien des bash Tutorioals auf raspithek.de
|
||||
| 14 |exit Codes |
|
||||
| 15 |von der Idee zum Script |
|
||||
| 16 |Funktionen |
|
||||
| 17 |Piping und Redirection |
|
||||
| 18 |tee |
|
||||
| 19 |alias |
|
||||
| 20 |Shebang |
|
||||
| 21 |sed |
|
||||
| 22 |cd |
|
||||
| 23 |case |
|
||||
| 24 |Arrays |
|
||||
|
||||
|
||||
Executable
+2
@@ -0,0 +1,2 @@
|
||||
|
||||
ll
|
||||
Executable
+3
@@ -0,0 +1,3 @@
|
||||
shopt -s expand_aliases # Aktiviert Aliase
|
||||
alias ll='ls -la'
|
||||
ll
|
||||
Executable
+66
@@ -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
|
||||
Executable
+11
@@ -0,0 +1,11 @@
|
||||
|
||||
read -n1 -p "Weitermachen? (j/n)" auswahl
|
||||
|
||||
echo "auswahl = ${auswahl}"
|
||||
if [ "${auswahl}" == 'j' ];then
|
||||
echo "Es geht weiter"
|
||||
else
|
||||
echo "Dann eben nicht"
|
||||
fi
|
||||
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
Gallia est omnis divisa in partes tres, quarum unam incolunt Belgae, aliam Aquitani, tertiam qui ipsorum lingua Celtae, nostra Galli appellantur.
|
||||
Hi omnes lingua, institutis, legibus inter se differunt.
|
||||
Gallos ab Aquitanis Garunna flumen, a Belgis Matrona et Sequana dividit.
|
||||
Horum omnium fortissimi sunt Belgae, propterea quod a cultu atque humanitate provinciae longissime absunt, minimeque ad eos mercatores saepe commeant atque ea quae ad effeminandos animos pertinent, important, proximique sunt Germanis, qui trans Rhenum incolunt, quibuscum continenter bellum gerunt.
|
||||
Qua de causa Helvetii quoque reliquos Gallos virtute praecedunt, quod fere cotidianis proeliis cum Germanis contendunt, cum aut suis finibus eos prohibent aut ipsi in eorum finibus bellum gerunt.
|
||||
Eorum una pars, quam Gallos obtinere dictum est, initium capit a flumine Rhodano, continetur Garumna flumine, Oceano, finibus Belgarum, attingit etiam ab Sequanis et Helvetiis flumen Rhenum, vergit ad septentriones.
|
||||
Belgae ab extremis Galliae finibus oriuntur, pertinent ad inferiorem partem fluminis Rheni, spectant in septentrionem et orientem solem.
|
||||
Aquitania a Garunna flumine ad Pyrenaeos montes et eam partem Oceani quae est ad Hispaniam pertinet; spectat inter occasum solis et septentriones.
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user