diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2008-04-21 14:00:24 +0000 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2008-04-21 14:00:24 +0000 |
commit | c7364f149634940be6821880bc3788c8adb5fb7f (patch) | |
tree | 3a247915a537f1b252915c2d29542d797168defe /winsup/cygwin/postinstall | |
parent | 2bc35e62995c59872a7aec8367934a37b3b786d9 (diff) | |
download | cygnal-c7364f149634940be6821880bc3788c8adb5fb7f.tar.gz cygnal-c7364f149634940be6821880bc3788c8adb5fb7f.tar.bz2 cygnal-c7364f149634940be6821880bc3788c8adb5fb7f.zip |
* mount.cc (mount_info::init): Remove call to from_registry. Print
message that fstab is missing.
(mount_info::from_fstab): Use CYGWIN_INFO_CYGDRIVE_DEFAULT_PREFIX
instead of constant string.
(mount_info::read_mounts): Remove.
(mount_info::from_registry): Remove.
(mount_info::read_cygdrive_info_from_registry): Remove.
* postinstall: Enable code to create fstab entries from old registry
entries.
* registry.cc (reg_key::reg_key): Drop CYGWIN_INFO_CYGNUS_REGISTRY_NAME
from registry key.
* shared_info.h (mount_info::read_mounts): Remove declaration.
(mount_info::from_registry): Ditto.
(mount_info::to_registry): Ditto.
(mount_info::read_cygdrive_info_from_registry): Ditto.
* winver.rc (CYGWIN_REGISTRY_KEY): Remove.
(LegalCopyright): Fix to include 2008.
(RegistryKey): Set to CYGWIN_INFO_CYGWIN_REGISTRY_NAME.
* include/cygwin/version.h (CYGWIN_INFO_CYGNUS_REGISTRY_NAME): Remove.
Diffstat (limited to 'winsup/cygwin/postinstall')
-rwxr-xr-x | winsup/cygwin/postinstall | 79 |
1 files changed, 38 insertions, 41 deletions
diff --git a/winsup/cygwin/postinstall b/winsup/cygwin/postinstall index 8a6928374..67fb70920 100755 --- a/winsup/cygwin/postinstall +++ b/winsup/cygwin/postinstall @@ -128,53 +128,50 @@ then EOF - # - # TODO: Enable the below code for the first official release. - # - #usr_bin="" - #usr_lib="" - #key='\HKLM\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2' - #for subkey in $(regtool -q list "$key") - #do - # if [[ "$subkey" =~ /.* ]] - # then - # [ "$subkey" = "/usr/bin" ] && usr_bin="1" - # [ "$subkey" = "/usr/lib" ] && usr_lib="1" - # nat=$(regtool -q get "$key\\$subkey\native") - # nat="${nat//\\//}" - # nat="${nat// /\\040}" - # psx="${subkey// /\\040}" - # flags=$(regtool -q get "$key\\$subkey\flags") - # echo -n "${nat} ${psx} some_fs " - # print_flags $flags - # echo " 0 0" - # fi >> ${FSTAB} - #done - #[ -z "$usr_bin" ] && + usr_bin="" + usr_lib="" + key='\HKLM\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2' + for subkey in $(regtool -q list "$key") + do + if [[ "$subkey" =~ /.* ]] + then + [ "$subkey" = "/usr/bin" ] && usr_bin="1" + [ "$subkey" = "/usr/lib" ] && usr_lib="1" + nat=$(regtool -q get "$key\\$subkey\native") + nat="${nat//\\//}" + nat="${nat// /\\040}" + psx="${subkey// /\\040}" + flags=$(regtool -q get "$key\\$subkey\flags") + echo -n "${nat} ${psx} some_fs " + print_flags $flags + echo " 0 0" + fi >> ${FSTAB} + done + [ -z "$usr_bin" ] && echo "${CYGROOT//\\//}/bin /usr/bin ${FS_TYPE} binary 0 0" >> ${FSTAB} - #[ -z "$usr_lib" ] && + [ -z "$usr_lib" ] && echo "${CYGROOT//\\//}/lib /usr/lib ${FS_TYPE} binary 0 0" >> ${FSTAB} - #cygd="" - #prefix=$(regtool -q get "$key\cygdrive prefix") - #flags=$(regtool -q get "$key\cygdrive flags") - #[ -z "$flags" ] && flags=2 - ## 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 " - # print_flags $flags - # echo ",user 0 0" - #fi >> ${FSTAB} + cygd="" + prefix=$(regtool -q get "$key\cygdrive prefix") + flags=$(regtool -q get "$key\cygdrive flags") + [ -z "$flags" ] && flags=2 + # 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 " + print_flags $flags + echo ",user 0 0" + fi >> ${FSTAB} - #if [ -z "$cygd" ] - #then + if [ -z "$cygd" ] + then echo "# This is default anyway:" >> ${FSTAB} echo "# none /cygdrive cygdrive binary,user 0 0" >> ${FSTAB} - #fi + fi IFS="$_OLD_IFS" fi |