mkbusyroot 311 B

1234567891011121314151617181920
  1. #!/bin/sh
  2. TARGET="$1"
  3. mkdir -p $TARGET
  4. pacstrap $TARGET busybox
  5. cd $TARGET
  6. ln -s usr/bin bin
  7. mkdir -p home
  8. tee etc/passwd <<<'root:x:0:0::/root:/bin/sh'
  9. tee etc/group <<<'root:x:0:root'
  10. tee etc/profile <<<'export PS1="[\u@\h \W]\$ "'
  11. cd usr/bin
  12. busybox --list | grep -v busybox | xargs -n1 ln -s busybox