Autogénération du fstab.
darcs-hash:20080209212217-41f88-42eb854d0af6f915e09d6199a7b11fac58b6814b.gz
This commit is contained in:
parent
bef2bd61cb
commit
d37751d8b9
4 changed files with 40 additions and 5 deletions
|
@ -18,4 +18,9 @@
|
|||
</Group>
|
||||
</Group>
|
||||
</Group>
|
||||
|
||||
<Group name="fstab.local">
|
||||
<!-- Autogénération du fstab -->
|
||||
<ConfigFile name="/etc/fstab"/>
|
||||
</Group>
|
||||
</Base>
|
||||
|
|
|
@ -411,13 +411,14 @@
|
|||
<Bundle name="nfs"/>
|
||||
</Group>
|
||||
|
||||
<!-- +======================+ -->
|
||||
<!-- | Connexion de secours | -->
|
||||
<!-- +======================+ -->
|
||||
<!-- Le groupe suivant est inclu automatiquement par le probe rescue
|
||||
lorsque l'on est en connexion de secours. -->
|
||||
<!-- +===================+ -->
|
||||
<!-- | Groupes dynamique | -->
|
||||
<!-- +===================+ -->
|
||||
|
||||
<Group name="rescue-mode"
|
||||
comment="groupe inclu lorsque l'on est en connexion de secours"/>
|
||||
|
||||
<Group name="fstab.local"
|
||||
comment="indique l'exsitence de /etc/fstab.local"/>
|
||||
|
||||
</Groups>
|
||||
|
|
10
Probes/fstab
Executable file
10
Probes/fstab
Executable file
|
@ -0,0 +1,10 @@
|
|||
#!/bin/bash
|
||||
|
||||
if [ ! -f /etc/fstab.local ]; then
|
||||
echo "none"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
echo "group:fstab.local"
|
||||
|
||||
exec cat /etc/fstab.local
|
19
Python/etc/fstab
Normal file
19
Python/etc/fstab
Normal file
|
@ -0,0 +1,19 @@
|
|||
# -*- coding: utf-8; mode: python -*-
|
||||
|
||||
header()
|
||||
|
||||
def mnt(fs, mntpoint, type, options=[], dump=0, pass_=0):
|
||||
print ("%s %s %s %s %d %d" %
|
||||
(fs, mntpoint, type,
|
||||
(options and ",".join(options)) or "defaults",
|
||||
dump, pass_))
|
||||
|
||||
@# Les définitions classiques
|
||||
mnt("proc", "/proc", "proc")
|
||||
|
||||
@# Les définitions locales
|
||||
print metadata.probes["fstab"]
|
||||
|
||||
if has("nfs"):
|
||||
@# Le nfs
|
||||
mnt("nfs.adm.crans.org:/usr/scripts", "/usr/scripts", "nfs", ["rw"])
|
Loading…
Add table
Add a link
Reference in a new issue