[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: umount bug?
From: |
Robert Shaw |
Subject: |
Re: umount bug? |
Date: |
Mon, 19 Feb 2001 14:13:59 -0700 |
Hi Mark,
Ok, I tracked down the unmount editing of the /etc/vfstab problem in
Solaris. Your regex for matching on the vfstab line is incorrect for the
Solaris cases. You had the following regex for ALL cases except Ultrx:
/* only find fs in proper context ("<host>:<remotepath> <fs> ") */
sprintf(VBUFF,"[^:]+:[^ \t]+[ \t]+%s[ \t]",fs);
Which does not match the Solaris vfstab format case:
<host>:<remotepath> - <fs> ....
So naturally, it will never remove the line on a Solaris station.
I've attached a patch uses the same switch-case entries that were used
in the mount addition code to properly select a different regex for
removing the line. Basically, the new code looks like this:
switch (VSYSTEMHARDCLASS)
{
case unix_sv:
case solarisx86:
case solaris:
/* find fs in proper context ("<host>:<remotepath> <-> <fs> ")
*/
sprintf(VBUFF,"[^:]+:[^ \t]+[ \t]+[^ \t]+[ \t]+%s[ \t]",fs);
break;
default:
/* find fs in proper context ("<host>:<remotepath> <fs> ") */
sprintf(VBUFF,"[^:]+:[^ \t]+[ \t]+%s[ \t]",fs);
break;
}
It's a very simple fix, and it does work. Please incorporate this fix
into the next release.
Thanks!
-Robert
diff -uNr cfengine-1.6.2.orig/src/do.c cfengine-1.6.2/src/do.c
--- cfengine-1.6.2.orig/src/do.c Thu Nov 30 16:06:46 2000
+++ cfengine-1.6.2/src/do.c Mon Feb 19 14:06:15 2001
@@ -1875,8 +1875,19 @@
}
else
{
- /* only find fs in proper context ("<host>:<remotepath> <fs> ") */
- sprintf(VBUFF,"[^:]+:[^ \t]+[ \t]+%s[ \t]",fs);
+ switch (VSYSTEMHARDCLASS)
+ {
+ case unix_sv:
+ case solarisx86:
+ case solaris:
+ /* find fs in proper context ("<host>:<remotepath> <-> <fs> ") */
+ sprintf(VBUFF,"[^:]+:[^ \t]+[ \t]+[^ \t]+[ \t]+%s[ \t]",fs);
+ break;
+ default:
+ /* find fs in proper context ("<host>:<remotepath> <fs> ") */
+ sprintf(VBUFF,"[^:]+:[^ \t]+[ \t]+%s[ \t]",fs);
+ break;
+ }
item = LocateItemContainingRegExp(filelist,VBUFF);
DeleteItem(&filelist,item);
}
- umount bug?, Robert Shaw, 2001/02/05
- Re: umount bug?,
Robert Shaw <=