microcore-mininit - stripped down Tiny Core Linux
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

microcore_mininit-config 1.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. #!/bin/busybox ash
  2. . /etc/init.d/tc-functions
  3. USER="tc"
  4. DISK="sda1"
  5. VERSION="$(cat /usr/share/doc/tc/release.txt)"
  6. echo "${GREEN}Booting ${YELLOW}Core $VERSION ${NORMAL}"
  7. # Start Udev to populate /dev and handle hotplug events
  8. /sbin/udevd --daemon >/dev/null 2>&1
  9. /sbin/udevadm trigger --action=add >/dev/null 2>&1
  10. # minimal tinycore environment
  11. echo "$USER" > /etc/sysconfig/tcuser
  12. echo "$DISK" > /etc/sysconfig/backup_device
  13. mkdir -p /mnt/"$DISK"
  14. echo "/dev/$DISK /mnt/$DISK ext2 noauto,users,exec,relatime 0 0" >> /etc/fstab
  15. filetool.sh -r >/dev/null 2>&1
  16. if [ ! -e /home/"$USER" ]; then
  17. mkdir -p /home/"$USER"
  18. cp -pr /etc/skel/. /home/"$USER"
  19. chown -R "$USER":staff /home/"$USER"
  20. chmod 2755 /home/"$USER"
  21. fi
  22. mkdir /tmp/tce /tmp/tcloop
  23. chown root:staff /tmp/tce /tmp/tcloop
  24. chmod 775 /tmp/tce /tmp/tcloop
  25. ln -s /tmp/tce /etc/sysconfig/tcedir
  26. touch /var/tmp/k5_skip
  27. # start networking
  28. modprobe ipv6
  29. ifconfig lo 127.0.0.1 netmask 255.0.0.0
  30. # Wait until all devices have registered
  31. echo -n "${BLUE}Waiting until all devices have registered...${NORMAL}"
  32. /sbin/udevadm settle --timeout=10
  33. echo "${GREEN} Done.${NORMAL}"
  34. # user defined initialization
  35. /opt/bootsync.sh