diff options
author | Aaron Plattner <aplattner@nvidia.com> | 2014-06-09 12:32:25 -0700 |
---|---|---|
committer | Aaron Plattner <aplattner@nvidia.com> | 2014-06-09 12:32:25 -0700 |
commit | 4479b7f2b8ad426bbcdf671e602d9516df871081 (patch) | |
tree | 2b2fa6991b17eb82bab251318c27eb32890e51af | |
parent | 57edcc2307731f0f28710390106670358927bc35 (diff) |
340.17340.17
-rw-r--r-- | misc.c | 65 | ||||
-rw-r--r-- | misc.h | 1 | ||||
-rw-r--r-- | nvidia-installer.c | 8 | ||||
-rw-r--r-- | nvidia-installer.h | 1 | ||||
-rw-r--r-- | option_table.h | 18 | ||||
-rw-r--r-- | utils.mk | 15 | ||||
-rw-r--r-- | version.mk | 2 |
7 files changed, 19 insertions, 91 deletions
@@ -115,71 +115,6 @@ int check_euid(Options *op) -/* - * check_runlevel() - attempt to run the `runlevel` program. If we - * are in runlevel 1, explain why that is bad, and ask the user if - * they want to continue anyway. - */ - -int check_runlevel(Options *op) -{ - int ret; - char *data, *cmd; - char ignore, runlevel; - - if (op->no_runlevel_check) return TRUE; - - cmd = find_system_util("runlevel"); - if (!cmd) { - ui_warn(op, "Skipping the runlevel check (the utility " - "`runlevel` was not found)."); - return TRUE; - } - - ret = run_command(op, cmd, &data, FALSE, FALSE, TRUE); - nvfree(cmd); - - if ((ret != 0) || (!data)) { - ui_warn(op, "Skipping the runlevel check (the utility " - "`runlevel` failed to run)."); - return TRUE; - } - - ret = sscanf(data, "%c %c", &ignore, &runlevel); - - if (ret != 2) { - ui_warn(op, "Skipping the runlevel check (unrecognized output from " - "the `runlevel` utility: '%s').", data); - nvfree(data); - return TRUE; - } - - nvfree(data); - - if (runlevel == 's' || runlevel == 'S' || runlevel == '1') { - ret = (ui_multiple_choice(op, CONTINUE_ABORT_CHOICES, - NUM_CONTINUE_ABORT_CHOICES, - ABORT_CHOICE, /* Default choice */ - "You appear to be running in runlevel 1; " - "this may cause problems. For example: some " - "distributions that use devfs do not run the " - "devfs daemon in runlevel 1, making it " - "difficult for `nvidia-installer` to " - "correctly set up the kernel module " - "configuration files. It is recommended " - "that you quit installation now and switch " - "to runlevel 3 (`telinit 3`) before " - "installing.") == ABORT_CHOICE); - - if (ret) return FALSE; - } - - return TRUE; - -} /* check_runlevel() */ - - - /* * adjust_cwd() - this function scans through program_name (ie * argv[0]) for any possible relative paths, and chdirs into the @@ -53,7 +53,6 @@ typedef enum { char *read_next_word (char *buf, char **e); int check_euid(Options *op); -int check_runlevel(Options *op); int adjust_cwd(Options *op, const char *program_name); char *get_next_line(char *buf, char **e, char *start, int length); int run_command(Options *op, const char *cmd, char **data, diff --git a/nvidia-installer.c b/nvidia-installer.c index 60f76b9..db336b0 100644 --- a/nvidia-installer.c +++ b/nvidia-installer.c @@ -328,7 +328,9 @@ static void parse_commandline(int argc, char *argv[], Options *op) op->rpm_file_list = strval; break; case NO_RUNLEVEL_CHECK_OPTION: - op->no_runlevel_check = TRUE; + /* This option is no longer used; ignore it. */ + nv_warning_msg("The '--no-runlevel-check' option is deprecated: " + "nvidia-installer will ignore this option."); break; case 'N': op->no_network = TRUE; @@ -548,10 +550,6 @@ int main(int argc, char *argv[]) if (!check_euid(op)) goto done; - /* check that we're in a safe runlevel */ - - if (!check_runlevel(op)) goto done; - /* * find the system utilities we'll need * diff --git a/nvidia-installer.h b/nvidia-installer.h index b781be6..e947c87 100644 --- a/nvidia-installer.h +++ b/nvidia-installer.h @@ -143,7 +143,6 @@ typedef struct __options { int which_tls_compat32; int sanity; int add_this_kernel; - int no_runlevel_check; int no_backup; int no_network; int kernel_module_only; diff --git a/option_table.h b/option_table.h index f1e02a7..1d49dda 100644 --- a/option_table.h +++ b/option_table.h @@ -398,14 +398,6 @@ static const NVGetoptOption __options[] = { { "no-precompiled-interface", 'n', 0, NULL, "Disable use of precompiled kernel interfaces." }, - { "no-runlevel-check", NO_RUNLEVEL_CHECK_OPTION, 0, NULL, - "Normally, the installer checks the current runlevel and " - "warns users if they are in runlevel 1: in runlevel 1, some " - "services that are normally active are disabled (such as devfs), " - "making it difficult for the installer to properly setup the " - "kernel module configuration files. This option disables the " - "runlevel check." }, - { "no-abi-note", NO_ABI_NOTE_OPTION, 0, NULL, "The NVIDIA OpenGL libraries contain an OS ABI note tag, " "which identifies the minimum kernel version needed to use the " @@ -425,9 +417,8 @@ static const NVGetoptOption __options[] = { "conflicting files, rather than back them up." }, { "no-network", 'N', 0, NULL, - "This option instructs the installer to not attempt to " - "connect to the NVIDIA ftp site (for updated precompiled kernel " - "interfaces, for example)." }, + "This option instructs the installer to not attempt to access the " + "network." }, { "no-recursion", NO_RECURSION_OPTION, 0, NULL, "Normally, nvidia-installer will recursively search for " @@ -650,6 +641,11 @@ static const NVGetoptOption __options[] = { { "advanced-options-args-only", ADVANCED_OPTIONS_ARGS_ONLY_OPTION, 0, NULL, NULL }, + /* Deprecated options: These options are no longer used, but + * nvidia-installer will allow the user to set them anyway, for + * backwards-compatibility purposes. */ + { "no-runlevel-check", NO_RUNLEVEL_CHECK_OPTION, 0, NULL, NULL }, + { NULL, 0, 0, NULL, NULL }, }; @@ -230,7 +230,7 @@ NV_MODULE_LOGGING_NAME ?= ifeq ($(NV_VERBOSE),0) quiet_cmd = @$(PRINTF) \ - " $(if $(NV_MODULE_LOGGING_NAME),[ %-17.17s ]) $(quiet_$(1))\n" \ + " $(if $(NV_MODULE_LOGGING_NAME),[ %-17.17s ],%s) $(quiet_$(1))\n" \ "$(NV_MODULE_LOGGING_NAME)" && $($(1)) else quiet_cmd = $($(1)) @@ -343,11 +343,12 @@ define DEFINE_STAMP_C_RULE $$(call BUILD_OBJECT_LIST,$$(STAMP_C)),$(1)) \ $$(VERSION_MK) @ $$(RM) $$@ - @ $$(PRINTF) "const char NV_ID[] = \"nvidia id: " >> $$@ - @ $$(PRINTF) "$(2): " >> $$@ - @ $$(PRINTF) "version $$(NVIDIA_VERSION) " >> $$@ - @ $$(PRINTF) "($$(shell $$(WHOAMI))@$$(shell $$(HOSTNAME_CMD))) " >> $$@ - @ $$(PRINTF) "$$(shell $(DATE))\";\n" >> $$@ - @ $$(PRINTF) "const char *pNV_ID = NV_ID + 11;\n" >> $$@ + @ $$(PRINTF) "%s" "const char NV_ID[] = \"nvidia id: " >> $$@ + @ $$(PRINTF) "%s" "$(2): " >> $$@ + @ $$(PRINTF) "%s" "version $$(NVIDIA_VERSION) " >> $$@ + @ $$(PRINTF) "%s" "($$(shell $$(WHOAMI))" >> $$@ + @ $$(PRINTF) "%s" "@$$(shell $$(HOSTNAME_CMD))) " >> $$@ + @ $$(PRINTF) "%s\n" "$$(shell $(DATE))\";" >> $$@ + @ $$(PRINTF) "%s\n" "const char *pNV_ID = NV_ID + 11;" >> $$@ endef @@ -1 +1 @@ -NVIDIA_VERSION = 337.25 +NVIDIA_VERSION = 340.17 |