summary refs log tree commit diff
path: root/sbin
diff options
context:
space:
mode:
Diffstat (limited to 'sbin')
-rw-r--r--sbin/fdmaker/fdmaker.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/sbin/fdmaker/fdmaker.c b/sbin/fdmaker/fdmaker.c
index 7591147..95ef98c 100644
--- a/sbin/fdmaker/fdmaker.c
+++ b/sbin/fdmaker/fdmaker.c
@@ -6,6 +6,7 @@
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <sys/sysmacros.h>
+#include <string.h>
 
 int main() {
     // make process be sigma (why did i think of this)
@@ -27,6 +28,15 @@ int main() {
         write(2, "ioctl TIOCSCTTY", 16);
         exit(1);
     }
+    char path[128] = {0};
+    int len = write(fd, "\nEnter path to shell (nothing for /bin/shel): ", 47);
+    path[len - 1] = '\0';
+    read(0, path, sizeof(path));
+    if (len == 47) {
+        strcpy(path, "/bin/shel");
+    }
+    // write(1, path, strlen(path));
     write(fd, "\e[2J\e[0;0Hwelcome to nyaOS - a distro made by an idiot with no C experience that still somehow works\n\n", 103);
-    execve("/bin/shel", 0, 0);
+    
+    execve(path, 0, 0);
 }
\ No newline at end of file