Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Bash Script umount Problem

Empfohlene Antworten

Veröffentlicht

Hallo,

Ich schreib zurzeit an einem kleinen Script und will dabei eine Platte welche irgendwo gemounted ist aushängen und anschließend unter /mnt wieder einhängen. Es funktioniert auch alles soweit, nur will sich die Platte nicht vom Script unmounten lassen, manuell funktioniert es jedoch ohne Probleme. Sieht jemand den Fehler?

Es folgt der betreffende Code Schnippsel



## /dev/sdb1 unterhalb von /mnt einhängen ##

uuid="56BFDCA547DBBB0E" #UUID der Backup Platte

mount | grep $uuid > /dev/null

if [ $? -eq 0 ]

then {

echo `date`" Die Platte ist noch eingehängt, Sie wird jetzt ausgehängt" | tee -a $logfile ;

umount -f  /dev/disk/by-uuid/$uuid #BU Platte  wird ausgehängt


if [ $? -ne 0 ]

then

echo `date`" Unmounten schlug fehl!" | tee -a $logfile;

exit 1

fi


}

fi


mount UUID=$uuid /mnt ## BU Platte wird unter /mnt neu eingehängt


if  [ $? -eq 0 ]

then

{

echo `date`" Platte wure erfolgreich eingehängt";

}

else

{

echo `date`" Die Platte konnte nicht neu eingehängt werden! Bitte hängen Sie die Platte manuell aus! "|tee -a $logfile | zenity --warning --text "Die Platte konnte nicht neu eingehängt werden! \n Bitte hängen Sie die Platte manuell aus!";

exit 1

}

fi


Archiv

Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.