bash question
- From: Douglas Mayne <doug@xxxxxxxxxxxxxxxxx>
- Date: Sat, 24 Feb 2007 08:48:19 -0700
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
.
- Follow-Ups:
- Re: bash question
- From: Bill Marcum
- Re: bash question
- Prev by Date: Can't get xwpe to start
- Next by Date: Re: bash question
- Previous by thread: Can't get xwpe to start
- Next by thread: Re: bash question
- Index(es):
Relevant Pages
|