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.

[/bin/sh] Warten, bis Device initialisiert?

Empfohlene Antworten

Veröffentlicht

Hallo,

hoffentlich bin ich hier richtig. :)

Ich möchte mir gern ein schönes Skript schreiben, welches mir mein TV-Programm erst startet, nachdem die USB-Fernsehbox eingebunden ist.

Meine Idee bislang:


#!/bin/sh

# Warten, bis DVB initialisiert

while [ ! -f /dev/dvb/adapter0/frontend0 ]

do echo "."; done


# Mythbackend starten

/usr/bin/mythbackend


Aber irgendwie klappt meine While-Schleife so nicht... Egal, ob /dev/dvb/adapter0/frontend0 existiert oder nicht, er läuft da in eine Endlosschleife. :confused:

Kann mir wer helfen?!?

PS: Falls es wichtig ist: Ich habe gentoo-Linux, Kernel 2.6.10.irgendwas, die Fernsehkarte ist die Hauppauge DEC-2000 T

hoffentlich bin ich hier richtig.

Nicht wirklich ;)

Ich schiebs ins Linuxforum.

Hallo,

habe mir gerade Dein Script angesehen...

[han@solo solo]$ man bash

-f file: True if file exists and is a regular file.
Bei der von Dir angesprochenem Datei handelt es sich aber um ein "Device File" und nicht um ein "Regular File". Würde Dir jetzt mal spontan folgenden "CONDITIONAL EXPRESSION" an Herz legen:
-a file: True if file exists.

In diesem Fall sollte es dann einfach egal sein was für eine Datei es genau ist; Hauptsache sie existiert.

Bye

SystemError

  • Autor

@wolle: Danke fürs Verschieben. War mir nicht ganz sicher, ob eher Programmierung oder eher Linux. :)

Hallo,

habe mir gerade Dein Script angesehen...

[han@solo solo]$ man bash

-f file: True if file exists and is a regular file.
Bei der von Dir angesprochenem Datei handelt es sich aber um ein "Device File" und nicht um ein "Regular File". Würde Dir jetzt mal spontan folgenden "CONDITIONAL EXPRESSION" an Herz legen:
-a file: True if file exists.

In diesem Fall sollte es dann einfach egal sein was für eine Datei es genau ist; Hauptsache sie existiert.

Bye

SystemError

Danke für den Denkanstoß. "-a" hat nicht geholfen, aber "-e" :)

Jetzt klappts :)

:marine

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.