From 45a700d5dbf0400231c5de8b99e3988251507274 Mon Sep 17 00:00:00 2001 From: Arnaud Desmons Date: Fri, 30 Aug 2002 14:36:37 +0000 Subject: first release --- nfs_wizard/Makefile | 18 ++++ nfs_wizard/images/NFS.png | Bin 0 -> 14505 bytes nfs_wizard/nfs.wiz | 216 ++++++++++++++++++++++++++++++++++++++++++ nfs_wizard/scripts/NFSConf.pm | 27 ++++++ 4 files changed, 261 insertions(+) create mode 100644 nfs_wizard/Makefile create mode 100644 nfs_wizard/images/NFS.png create mode 100644 nfs_wizard/nfs.wiz create mode 100644 nfs_wizard/scripts/NFSConf.pm (limited to 'nfs_wizard') diff --git a/nfs_wizard/Makefile b/nfs_wizard/Makefile new file mode 100644 index 00000000..ac203cc7 --- /dev/null +++ b/nfs_wizard/Makefile @@ -0,0 +1,18 @@ + +install2: + su -c 'make install' + +install: + mkdir -p --mode=u=rwx,g=rx,o=rx ${prefix}/usr/share/wizards + mkdir -p --mode=u=rwx,g=rx,o=rx ${prefix}/usr/share/wizards/nfs_wizard + mkdir -p --mode=u=rwx,g=rx,o=rx ${prefix}/usr/share/wizards/nfs_wizard/scripts + mkdir -p --mode=u=rwx,g=rx,o=rx ${prefix}/usr/share/wizards/nfs_wizard/images + install --mode=u=rwx,g=rx,o=rx -p nfs.wiz ${prefix}/usr/share/wizards/nfs_wizard + install --mode=u=rwx,g=rx,o=rx -p nfs.en.wpo ${prefix}/usr/share/wizards/nfs_wizard + install --mode=u=rwx,g=rx,o=rx -p nfs.fr.wpo ${prefix}/usr/share/wizards/nfs_wizard + install --mode=u=rwx,g=rx,o=rx -p nfs.de.wpo ${prefix}/usr/share/wizards/nfs_wizard + install --mode=u=rwx,g=rx,o=rx -p nfs.es.wpo ${prefix}/usr/share/wizards/nfs_wizard + install --mode=u=rwx,g=rx,o=rx -p nfs.it.wpo ${prefix}/usr/share/wizards/nfs_wizard + install --mode=a=r -p ./images/NFS.jpg ${prefix}/usr/share/wizards/nfs_wizard/images + install --mode=u=rwx,g=rx,o=rx -p scripts/*.sh ${prefix}/usr/share/wizards/nfs_wizard/scripts + diff --git a/nfs_wizard/images/NFS.png b/nfs_wizard/images/NFS.png new file mode 100644 index 00000000..945b63e8 Binary files /dev/null and b/nfs_wizard/images/NFS.png differ diff --git a/nfs_wizard/nfs.wiz b/nfs_wizard/nfs.wiz new file mode 100644 index 00000000..ae4bf2d8 --- /dev/null +++ b/nfs_wizard/nfs.wiz @@ -0,0 +1,216 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/nfs_wizard/scripts/NFSConf.pm b/nfs_wizard/scripts/NFSConf.pm new file mode 100644 index 00000000..942380d9 --- /dev/null +++ b/nfs_wizard/scripts/NFSConf.pm @@ -0,0 +1,27 @@ +#! /usr/bin/perl -w + +package NFSConf; +require "__WIZ_HOME__/common/scripts/Vareqval.pm"; +require "__WIZ_HOME__/common/scripts/DrakconnectConf.pm"; +use MDK::Common; +use strict; + +my $o = DrakconnectConf->new(); + +sub do_it { + my $file = "/etc/exports"; + my $ip = "$1.$2.$3.0" if $o->get_from_known_dev("IP") =~ /(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})/; + my $mask = $o->get_from_known_dev("Mask"); + my $line = "$ENV{wiz_nfs_dir} $ip/$mask(rw,no_root_squash)\n"; + my $t; + + foreach (cat_($file)) { + if (/^\s*(?!\#)\s*\$ENV{wiz_nfs_dir}.*/) { + $t = $_; + last; + } + } + if ($t) { substInFile { s|$t|\#$&$line|} $file } + else { append_to_file($file, $line) } + system("/usr/sbin/exportfs -a") +} -- cgit v1.2.1