diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2008-04-07 16:37:20 +0000 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2008-04-07 16:37:20 +0000 |
commit | f471ca85e17ea1b4fdc317527cfdba3e4463e359 (patch) | |
tree | 5afa060db53e95094dd4ead9be69c7688854918b /winsup/cygwin | |
parent | f7852548bbf47c13a9c6efbdeec51b5bb3a5f0bf (diff) | |
download | cygnal-f471ca85e17ea1b4fdc317527cfdba3e4463e359.tar.gz cygnal-f471ca85e17ea1b4fdc317527cfdba3e4463e359.tar.bz2 cygnal-f471ca85e17ea1b4fdc317527cfdba3e4463e359.zip |
* postinstall: Add function print_flags and call where appropriate.
Omit system and cygdrive flag when testing cygdrive flags.
Diffstat (limited to 'winsup/cygwin')
-rw-r--r-- | winsup/cygwin/ChangeLog | 5 | ||||
-rwxr-xr-x | winsup/cygwin/postinstall | 26 |
2 files changed, 19 insertions, 12 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 51e038aef..914611034 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,8 @@ +2008-04-07 Corinna Vinschen <corinna@vinschen.de> + + * postinstall: Add function print_flags and call where appropriate. + Omit system and cygdrive flag when testing cygdrive flags. + 2008-04-07 Christopher Faylor <me+cygwin@cgf.cx> Add miscfuncs.h to files as needed throughout. diff --git a/winsup/cygwin/postinstall b/winsup/cygwin/postinstall index bdcc033bf..69ec04936 100755 --- a/winsup/cygwin/postinstall +++ b/winsup/cygwin/postinstall @@ -12,6 +12,15 @@ export PATH="/bin:$PATH" DEVDIR=/dev +print_flags () +{ + (( $1 & 0x0002 )) && echo -n "binary" || echo -n "text" + (( $1 & 0x0010 )) && echo -n ",exec" + (( $1 & 0x0040 )) && echo -n ",cygexec" + (( $1 & 0x0100 )) && echo -n ",notexec" + (( $1 & 0x0800 )) && echo -n ",managed" +} + # Create fstab file if it doesn't exist. if [ -e "/etc/fstab" -a ! -f "/etc/fstab" ] then @@ -130,11 +139,7 @@ EOF psx="${subkey// /\\040}" flags=$(regtool -q get "$key\\$subkey\flags") echo -n "${nat} ${psx} some_fs " - (( $flags & 0x0002 )) && echo -n "binary" || echo -n "text" - (( $flags & 0x0010 )) && echo -n ",exec" - (( $flags & 0x0040 )) && echo -n ",cygexec" - (( $flags & 0x0100 )) && echo -n ",notexec" - (( $flags & 0x0800 )) && echo -n ",managed" + print_flags $flags echo " 0 0" fi >> /etc/fstab done @@ -145,17 +150,14 @@ EOF cygd="" prefix=$(regtool -q get "$key\cygdrive prefix") - flags=$(regtool -q get "$key\cygdrive flags") - if [ -n "$prefix" -a \( "$prefix" != "/cygdrive" -o "$flags" -ne 42 \) ] + # Don't take system and cygdrive flags into account when testing + if [ -n "$prefix" \ + -a \( "$prefix" != "/cygdrive" \ -o "$(( $flags & ~0x28 ))" -ne 2 \) ] then cygd="1" psx="${prefix// /\\040}" echo -n "none ${psx} cygdrive " - (( $flags & 0x0002 )) && echo -n "binary" || echo -n "text" - (( $flags & 0x0010 )) && echo -n ",exec" - (( $flags & 0x0040 )) && echo -n ",cygexec" - (( $flags & 0x0100 )) && echo -n ",notexec" - (( $flags & 0x0800 )) && echo -n ",managed" + print_flags $flags echo ",user 0 0" fi >> /etc/fstab |