Changeset 77774 in vbox
- Timestamp:
- Mar 19, 2019 12:59:41 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-server/UnattendedInstaller.cpp
r76553 r77774 913 913 ////////////////////////////////////////////////////////////////////////////////////////////////////// 914 914 915 /** 916 * Helper for checking if a file exists. 917 * @todo promote to IPRT? 918 */ 919 static bool hlpVfsFileExists(RTVFS hVfs, const char *pszPath) 920 { 921 RTFSOBJINFO ObjInfo; 922 int vrc = RTVfsQueryPathInfo(hVfs, pszPath, &ObjInfo, RTFSOBJATTRADD_NOTHING, RTPATH_F_FOLLOW_LINK); 923 return RT_SUCCESS(vrc) && RTFS_IS_FILE(ObjInfo.Attr.fMode); 924 } 925 915 926 HRESULT UnattendedDebianInstaller::addFilesToAuxVisoVectors(RTCList<RTCString> &rVecArgs, RTCList<RTCString> &rVecFiles, 916 927 RTVFS hVfsOrgIso, bool fOverwrite) 917 928 { 929 /* 930 * The txt.cfg file used to be called isolinux.txt (ubuntu 4.10 931 * and possible others). 932 */ 933 /** @todo Ubuntu 4.10 does not work, as we generate too long command lines 934 * and the kernel crashes immediately. */ 935 const char *pszIsoLinuxTxtCfg = "/isolinux/txt.cfg"; 936 if ( !hlpVfsFileExists(hVfsOrgIso, pszIsoLinuxTxtCfg) 937 && hlpVfsFileExists(hVfsOrgIso, "/isolinux/isolinux.txt")) 938 pszIsoLinuxTxtCfg = "/isolinux/isolinux.txt"; 939 918 940 /* 919 941 * VISO bits and filenames. … … 935 957 /* Remove the two isolinux configure files we'll be replacing. */ 936 958 rVecArgs.append() = "isolinux/isolinux.cfg=:must-remove:"; 937 rVecArgs.append() = "isolinux/txt.cfg=:must-remove:";959 rVecArgs.append().assign(&pszIsoLinuxTxtCfg[1]).append("=:must-remove:"); 938 960 939 961 /* Add the replacement files. */ … … 944 966 strTxtCfg = mpParent->i_getAuxiliaryBasePath(); 945 967 strTxtCfg.append("isolinux-txt.cfg"); 946 rVecArgs.append().a ppend("isolinux/txt.cfg=").append(strTxtCfg);968 rVecArgs.append().assign(&pszIsoLinuxTxtCfg[1]).append("=").append(strTxtCfg); 947 969 } 948 970 catch (std::bad_alloc &) … … 984 1006 { 985 1007 GeneralTextScript Editor(mpParent); 986 HRESULT hrc = loadAndParseFileFromIso(hVfsOrgIso, "/isolinux/txt.cfg", &Editor);1008 HRESULT hrc = loadAndParseFileFromIso(hVfsOrgIso, pszIsoLinuxTxtCfg, &Editor); 987 1009 if (SUCCEEDED(hrc)) 988 1010 hrc = editDebianTxtCfg(&Editor);
Note:
See TracChangeset
for help on using the changeset viewer.