Twitter iPhone pliant OnePlus 11 PS5 Disney+ Orange Livebox Windows 11

Monter un disque réseau au boot ?

35 réponses
Avatar
pehache
Bonsoir,

je cherche comment monter un disque réseau (samba) lors du boot.
Apparemment ça ne passe pas par fstab. Sur le web j'ai trouvé (avec
difficulté) une solution qui explique qu'il faut ajouter des entrées
dans /Library/StartupItems/ , en prenant exemple dans ce qui se trouve
dans /System/Library/StartupItems . Sauf que chez moi ce dernier dossier
est vide.

Est-ce là la bonne méthode (pour savoir si je fouille un peu plus dans
cette direction) ?

Sinon j'ai trouvé plein d'explications pour monter un disque à
l'ouverture d'une session, mais ce n'est pas ce que je veux.

Merci,

--
pehache

5 réponses

1 2 3 4
Avatar
Matt
On Lun 06 jui 2011, 18:40,
Matt wrote:

[snip...]



J'ajouterai également un article d'Apple prêchant sur son bébé, lorsque
Mac OS X 10.4 est sorti :
<http://web.archive.org/web/20070704235452/http://developer.apple.com/m
acosx/launchd.html>

--
echo '' |
tr '[a-z]' '[n-za-m]'
Avatar
xavier
Matt wrote:

Tu as testé ce qui suit ?

<key>KeepAlive</key>
<dict>
<key>NetworkState</key>
<true/>
</dict>



Non, parce que je n'ai pas trouvé la doc indiquant cette clé :-)

Note que même en StartupItem, j'ai été de mettre un gros sleep pour
laisser le temps à l'interface de monter...

C'est pourtant pas un serveur préhistorique, un MDD 2*1,25 G4

--
XAv
In your pomp and all your glory you're a poorer man than me,
as you lick the boots of death born out of fear.
(Jethro Tull)
Avatar
xavier
Matt wrote:

<http://web.archive.org/web/20070704235452/http://developer.apple.com/m
acosx/launchd.html>



Ce paragraphe est savoureux :

Migrating from StartupItems
Many services are configured using StartupItems for historical reasons.
MSome, however, are run this way because they have interdependencies.
MThese jobs cannot be directly translated to run under launchd, which does
Mnot provide for explicit dependencies. Instead, services are supposed to
Mwait for needed resources to become available, which handles the majority
Mof cases cleanly. Secondly, some services need an explicit shutdown
Mprocedure, which is handled by the StopService() function in a
MStartupItem script.



Et, BTW, la clé dont tu parlais dans l'autre post, n'a pas l'air d'être
prévue pour attendre que le réseau soit up :

NetworkState <boolean>
If true, the job will be kept alive as long as the network is up, where
up is defined as at least one non-loopback interface being up and having
IPv4 or IPv6 addresses assigned to them. If false, the job will be kept
alive in the inverse condition.



Donc, je garde mon baril de StartupItem. If it works, don't fix it.

--
XAv
In your pomp and all your glory you're a poorer man than me,
as you lick the boots of death born out of fear.
(Jethro Tull)
Avatar
Matt
On Lun 06 jui 2011, 19:58,
Xavier wrote:

Et, BTW, la clé dont tu parlais dans l'autre post, n'a pas l'air d'être
prévue pour attendre que le réseau soit up :

NetworkState <boolean>
If true, the job will be kept alive as long as the network is up, where
up is defined as at least one non-loopback interface being up and having
IPv4 or IPv6 addresses assigned to them. If false, the job will be kept
alive in the inverse condition.





Je me suis mal fait comprendre, désolé.
Avec NetworkState comme condition de KeepAlive, launchd(8) va tenter le
lancement jusqu'à ce que la condition soit rencontrée.

Donc, je garde mon baril de StartupItem. If it works, don't fix it.



En effet c'est la règle :)

--
echo '' |
tr '[a-z]' '[n-za-m]'
Avatar
Matt
On Lun 06 jui 2011, 19:58,
Xavier wrote:

Non, parce que je n'ai pas trouvé la doc indiquant cette clé :-)



Elle est apparue avec Mac OS X 10.5 en remplacement d'OnDemand.

--
echo '' |
tr '[a-z]' '[n-za-m]'
1 2 3 4