Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[systemd-generator]: Remove creation of NUM_ASIC environment variable #5122

Merged
merged 1 commit into from
Aug 11, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 0 additions & 10 deletions src/systemd-sonic-generator/systemd-sonic-generator.c
Original file line number Diff line number Diff line change
Expand Up @@ -498,7 +498,6 @@ static int get_num_of_asic() {
Determines if the current platform is single or multi-ASIC
***/
FILE *fp;
FILE *env_fp;
char *line = NULL;
char* token;
char* platform;
Expand Down Expand Up @@ -546,15 +545,6 @@ static int get_num_of_asic() {
free(line);
}
}

/*set environment variable NUM_ASIC */
env_fp = fopen("/etc/environment", "a");
if (env_fp == NULL) {
fprintf(stderr, "Failed to open environment file\n");
exit(EXIT_FAILURE);
}
fprintf(env_fp, "NUM_ASIC=%d\n", num_asic);
fclose(env_fp);
return num_asic;

}
Expand Down