]> andersk Git - moira.git/commitdiff
if you get a "not exported" error while manipulating a filesys, let
authormar <mar>
Thu, 1 Sep 1988 15:41:43 +0000 (15:41 +0000)
committermar <mar>
Thu, 1 Sep 1988 15:41:43 +0000 (15:41 +0000)
the user go to the nfsphys menu, then try again.

clients/moira/attach.c

index 1bfd94a910121a8dc5a7f6c441f38d0cf91d0fe5..2951b00044e9a6e4ca543cd07021ca24dbb57cd4 100644 (file)
@@ -325,12 +325,26 @@ Bool junk;
 {
     int stat;
     char ** args = AskFSInfo(info, TRUE);
-
-    if ( (stat = sms_query("update_filesys", CountArgs(args), 
-                          args, NullFunc, NULL)) != 0)
-       com_err(program_name, stat, ", filesystem not updated");
-    else
-       Put_message("filesystem sucessfully updated.");
+    extern Menu nfsphys_menu;
+
+    stat = sms_query("update_filesys", CountArgs(args), args, NullFunc, NULL);
+    switch (stat) {
+    case SMS_NFS:
+       Put_message("That NFS filesystem is not exported.");
+       if (YesNoQuestion("Fix this now (Y/N)")) {
+           Do_menu(&nfsphys_menu, 0, NULL);
+           if (YesNoQuestion("Retry filesystem update now (Y/N)")) {
+               if (stat = sms_query("update_filesys", CountArgs(args), args,
+                                    NullFunc, NULL))
+                   com_err(program_name, stat, " filesystem not updated");
+               else
+                   Put_message("filesystem sucessfully updated.");
+           }
+       }
+       break;
+    default:
+       com_err(program_name, stat, " in AddFS");
+    }
 }
 
 /*     Function Name: ChangeFS
@@ -366,6 +380,7 @@ int argc;
 {
     char *info[MAX_ARGS_SIZE], **args;
     int stat;
+    extern Menu nfsphys_menu;
 
     if ( !ValidName(argv[1]) )
        return(DM_NORMAL);
@@ -381,9 +396,24 @@ int argc;
 
     args = AskFSInfo(SetDefaults(info, argv[1]), FALSE );
 
-    if ( (stat = sms_query("add_filesys", CountArgs(args), args, 
-                        NullFunc, NULL)) != 0)
+    stat = sms_query("add_filesys", CountArgs(args), args, NullFunc, NULL);
+    switch (stat) {
+    case SMS_NFS:
+       Put_message("That NFS filesystem is not exported.");
+       if (YesNoQuestion("Fix this now (Y/N)")) {
+           Do_menu(&nfsphys_menu, 0, NULL);
+           if (YesNoQuestion("Retry filesystem creation now (Y/N)")) {
+               if (stat = sms_query("add_filesys", CountArgs(args), args,
+                                    NullFunc, NULL))
+                   com_err(program_name, stat, " in AddFS");
+               else
+                   Put_message("Created.");
+           }
+       }
+       break;
+    default:
        com_err(program_name, stat, " in AddFS");
+    }
 
     FreeInfo(info);
     return (DM_NORMAL);
This page took 0.041393 seconds and 5 git commands to generate.