bash question



I found this code here:
http://gentoo-wiki.com/SECURITY_Encrypting_Root_Filesystem_with_DM-Crypt
which is used as the final part of starting up from an initrd. I have
added line numbers for reference in this post.

1 # Start init and flush ram device
2 exec chroot . /bin/sh <<- EOF >/dev/console 2>&1
3 umount initrd
4 rm -rf initrd
5 blockdev --flushbufs /dev/ram0
6 exec /sbin/init ${CMDLINE}
7 EOF

The exec statement on line 2 sets up for the final transfer to the
real init on line 6. Line 7 presumably terminates the "HERE" document
openened on line 2.

2 exec chroot . /bin/sh <<- EOF >/dev/console 2>&1
- +
- |

My question is why is the dash used? This isn't a form for starting to
read from a "HERE" document that I am familiar with. Any other comments on
line 2 are welcome, because it seems somewhat like a "magic incantation"
to me.

TIA

--
Douglas Mayne


.



Relevant Pages

  • Re: How do I rebuild the initrd?
    ... I need to know if anyone has the magic incantation to get mkinitrd to build a ... proper initrd from either rescue mode or the live cd. ... If I boot into rescue mode and setup a chroot, when I run mkinitrd I get ... When I rebooted the machines came up normally. ...
    (Fedora)
  • Re: bash question
    ... which is used as the final part of starting up from an initrd. ... My question is why is the dash used? ... because it seems somewhat like a "magic incantation" ... man bash ...
    (comp.os.linux.misc)