From d37751d8b9669f416549796a8aa539cd87b724a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20Dimino?= Date: Sat, 9 Feb 2008 22:22:17 +0100 Subject: [PATCH] =?UTF-8?q?Autog=C3=A9n=C3=A9ration=20du=20fstab.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit darcs-hash:20080209212217-41f88-42eb854d0af6f915e09d6199a7b11fac58b6814b.gz --- Base/needed.xml | 5 +++++ Metadata/groups.xml | 11 ++++++----- Probes/fstab | 10 ++++++++++ Python/etc/fstab | 19 +++++++++++++++++++ 4 files changed, 40 insertions(+), 5 deletions(-) create mode 100755 Probes/fstab create mode 100644 Python/etc/fstab diff --git a/Base/needed.xml b/Base/needed.xml index f30ecd6..8ef55f2 100644 --- a/Base/needed.xml +++ b/Base/needed.xml @@ -18,4 +18,9 @@ + + + + + diff --git a/Metadata/groups.xml b/Metadata/groups.xml index fa543d5..84bf06a 100644 --- a/Metadata/groups.xml +++ b/Metadata/groups.xml @@ -411,13 +411,14 @@ - - - - + + + + + diff --git a/Probes/fstab b/Probes/fstab new file mode 100755 index 0000000..4f82473 --- /dev/null +++ b/Probes/fstab @@ -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 diff --git a/Python/etc/fstab b/Python/etc/fstab new file mode 100644 index 0000000..e53fc40 --- /dev/null +++ b/Python/etc/fstab @@ -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"])