what does "cat > /sbin/reboot <<EOF" do in init script?
by flyxtop from LinuxQuestions.org on (#5CGZY)
this is the init script from a ramdisk image.
After kernel finishes booting, it executes this init script.
--------------------------
/bin/busybox --install -s
rm /sbin/reboot
cat > /sbin/reboot <<EOF
#/bin/sh
exec /bin/busybox reboot -f
EOF
-------------------
I think when this script is run, the initrd has been already mounted. What does "cat > /sbin/reboot <<EOF" do?


After kernel finishes booting, it executes this init script.
--------------------------
/bin/busybox --install -s
rm /sbin/reboot
cat > /sbin/reboot <<EOF
#/bin/sh
exec /bin/busybox reboot -f
EOF
-------------------
I think when this script is run, the initrd has been already mounted. What does "cat > /sbin/reboot <<EOF" do?