Advertisement
Guest User

Untitled

a guest
Dec 23rd, 2010
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.61 KB | None | 0 0
  1. Folgendes Problem: Also mein Systemanalysetool is soweit fertig gescriptet, aber ein Fehler gibts im Code noch:
  2. Und zwar wird die Ausgabe vom folgenden Befehl (dem dialog) IMMER gemacht, auch wenn garkein parameter zu dem befehl beim ausführen geschrieben wird, ich tippe also zb nur ./script.txt und trotzdem behandelt ders, als wär das ./script.txt +h oder so.
  3. Das intressante ist aber, dass er zwar die Meldung gibt und nach dem Passwort fragt, JEDOCH die Datei in Wahrheit garnicht verschiebt!
  4.  
  5. if [ -f /etc/cron.weekly/script.txt ]
  6. then
  7. cd ~
  8. elif [ $1="+w" ]
  9. then
  10. sudo mv ~/Desktop/script.txt /etc/cron.weekly/script.txt
  11. dialog --title "Automatischer Toolstart:" --backtitle "Tooleinstellungen" --msgbox "Tool wird nun jede Woche ausgeführt." 0 0
  12. clear
  13. elif [ $1="+wd" ]
  14. then
  15. sudo mv ~/Desktop/script.txt /etc/cron.daily/script.txt
  16. dialog --title "Automatischer Toolstart:" --backtitle "Tooleinstellungen" --msgbox "Tool wird nun jede Woche ausgeführt." 0 0
  17. clear
  18. elif [ $1="+dw" ]
  19. then
  20. sudo mv ~/Desktop/script.txt /etc/cron.daily/script.txt
  21. dialog --title "Automatischer Toolstart:" --backtitle "Tooleinstellungen" --msgbox "Tool wird nun jede Woche ausgeführt." 0 0
  22. clear
  23. elif [ $1="+wh" ]
  24. then
  25. sudo mv ~/Desktop/script.txt /etc/cron.hourly/script.txt
  26. dialog --title "Automatischer Toolstart:" --backtitle "Tooleinstellungen" --msgbox "Tool wird nun jede Woche ausgeführt." 0 0
  27. clear
  28. elif [ $1="+hw" ]
  29. then
  30. sudo mv ~/Desktop/script.txt /etc/cron.hourly/script.txt
  31. dialog --title "Automatischer Toolstart:" --backtitle "Tooleinstellungen" --msgbox "Tool wird nun jede Woche ausgeführt." 0 0
  32. clear
  33. fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement