mirror of
https://github.com/troglobit/finit.git
synced 2026-10-27 12:20:54 +00:00
1 parent
7867db7b23
commit
136dfeb41a
1 file changed
+6
-5
+6
-5
@@ -164,7 +164,7 @@ int main()
|
|||||||
|
|
||||||
i = strlen(line);
|
i = strlen(line);
|
||||||
if (i && line[i - 1] == '\n')
|
if (i && line[i - 1] == '\n')
|
||||||
line[i] = 0;
|
line[i - 1] = 0;
|
||||||
|
|
||||||
if (debug)
|
if (debug)
|
||||||
printf("conf: %s\n", line);
|
printf("conf: %s\n", line);
|
||||||
@@ -173,20 +173,21 @@ int main()
|
|||||||
x += 6;
|
x += 6;
|
||||||
strcpy(cmd, "/sbin/e2fsck -C -p ");
|
strcpy(cmd, "/sbin/e2fsck -C -p ");
|
||||||
c = cmd + strlen(cmd);
|
c = cmd + strlen(cmd);
|
||||||
while (x && *x != ' ') *c++ = *x++;
|
while (x && *x && *x != ' ') *c++ = *x++;
|
||||||
system(cmd);
|
system(cmd);
|
||||||
|
continue;
|
||||||
}
|
}
|
||||||
if ((x = strstr(line, "user ")) == line) {
|
if ((x = strstr(line, "user ")) == line) {
|
||||||
x += 5;
|
x += 5;
|
||||||
c = username;
|
c = username;
|
||||||
while (x && *x != ' ') *c++ = *x++;
|
while (x && *x && *x != ' ') *c++ = *x++;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if ((x = strstr(line, "module ")) == line) {
|
if ((x = strstr(line, "module ")) == line) {
|
||||||
x += 7;
|
x += 7;
|
||||||
strcpy(cmd, "/sbin/insmod ");
|
strcpy(cmd, "/sbin/modprobe ");
|
||||||
c = cmd + strlen(cmd);
|
c = cmd + strlen(cmd);
|
||||||
while (x && *x != ' ') *c++ = *x++;
|
while (x && *x && *x != ' ') *c++ = *x++;
|
||||||
system(cmd);
|
system(cmd);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user