Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
lehrkraefte:snr:informatik:glf22:python-schullaptops [2023/05/12 19:57] Olaf Schnürer [Zurückgegebene Linux-Rechner zurücksetzen] |
lehrkraefte:snr:informatik:glf22:python-schullaptops [2023/06/09 19:08] (current) Karlheinz Schubert |
||
---|---|---|---|
Line 16: | Line 16: | ||
* '' | * '' | ||
* Gehe in's tech-lab home directory. | * Gehe in's tech-lab home directory. | ||
- | * '' | + | * '' |
- | * '' | + | * '' |
* WLAN credentials löschen? | * WLAN credentials löschen? | ||
+ | <code lang=bash> | ||
+ | #!/bin/bash | ||
+ | read -p "Do you wish to remove all files from '/ | ||
+ | case $yn in | ||
+ | [Yy]* ) | ||
+ | echo " | ||
+ | cd / | ||
+ | if [[ $PWD/ != / | ||
+ | echo "$PWD not / | ||
+ | exit; | ||
+ | fi | ||
+ | rm -rdf *; | ||
+ | rm -rdf .*; | ||
+ | cd /etc/skel/; | ||
+ | cp -r . / | ||
+ | cd / | ||
+ | sudo chown tech-lab .*; | ||
+ | sudo chgrp tech-lab .*; | ||
+ | exit;; | ||
+ | [Nn]* ) | ||
+ | echo " | ||
+ | exit;; | ||
+ | |||
+ | * ) | ||
+ | echo "Input not recognized": | ||
+ | exit;; | ||
+ | esac | ||
+ | echo " | ||
+ | |||
+ | </ | ||