Changeset 2326 in MondoRescue for branches/2.2.10/mondo/src/common/libmondo-devices.c
- Timestamp:
- Aug 18, 2009, 3:19:54 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.2.10/mondo/src/common/libmondo-devices.c
r2325 r2326 1823 1823 if (archiving_to_media) { 1824 1824 1825 mr_free(bkpinfo->boot_device); 1825 1826 #ifdef __FreeBSD__ 1826 strcpy(bkpinfo->boot_device, 1827 call_program_and_get_last_line_of_output 1828 ("mount | grep ' / ' | head -1 | cut -d' ' -f1 | sed 's/\\([0-9]\\).*/\\1/'")); 1827 #define EXAMPLEBD "/dev/ad0" 1828 mr_asprintf(bkpinfo->boot_device, "%s", call_program_and_get_last_line_of_output("mount | grep ' / ' | head -1 | cut -d' ' -f1 | sed 's/\\([0-9]\\).*/\\1/'")); 1829 1829 #else 1830 strcpy(bkpinfo->boot_device, 1831 call_program_and_get_last_line_of_output 1832 ("mount | grep ' / ' | head -1 | cut -d' ' -f1 | sed 's/[0-9].*//'")); 1830 #define EXAMPLEBD "/dev/hda" 1831 mr_asprintf(bkpinfo->boot_device, "%s", call_program_and_get_last_line_of_output("mount | grep ' / ' | head -1 | cut -d' ' -f1 | sed 's/[0-9].*//'")); 1833 1832 #endif 1834 1833 i = which_boot_loader(bkpinfo->boot_device); … … 1836 1835 { 1837 1836 1838 #ifdef __FreeBSD__ 1839 p = popup_and_get_string("Boot device", "What is your boot device? (e.g. /dev/ad0)", bkpinfo->boot_device); 1840 if (!p == NULL) { 1841 log_to_screen("User has chosen not to backup the PC"); 1842 finish(1); 1843 } 1844 strcpy(bkpinfo->boot_device, p); 1845 mr_free(p); 1846 i = which_boot_loader(bkpinfo->boot_device); 1847 #else 1848 p = popup_and_get_string("Boot device", "What is your boot device? (e.g. /dev/hda)", bkpinfo->boot_device); 1837 p = popup_and_get_string("Boot device", "What is your boot device? (e.g. "EXAMPLEBD")", bkpinfo->boot_device); 1838 #undef EXAMPLEBD 1849 1839 if (p == NULL) { 1850 1840 log_to_screen("User has chosen not to backup the PC"); 1851 1841 finish(1); 1852 1842 } 1853 strcpy(bkpinfo->boot_device, p); 1854 mr_free(p); 1855 1843 mr_free(bkpinfo->boot_device); 1844 bkpinfo->boot_device = p; 1845 #ifdef __FreeBSD__ 1846 i = which_boot_loader(bkpinfo->boot_device); 1847 #else 1856 1848 if (does_string_exist_in_boot_block(bkpinfo->boot_device, "LILO")) { 1857 1849 i = 'L'; … … 1867 1859 #endif 1868 1860 if (i == 'U') { 1869 if (ask_me_yes_or_no 1870 ("Unidentified boot loader. Shall I restore it byte-for-byte at restore time and hope for the best?")) 1871 { 1861 if (ask_me_yes_or_no("Unidentified boot loader. Shall I restore it byte-for-byte at restore time and hope for the best?")) { 1872 1862 i = 'R'; // raw 1873 1863 } else { 1874 log_to_screen 1875 ("I cannot find your boot loader. Please run mondoarchive with parameters."); 1864 log_to_screen("I cannot find your boot loader. Please run mondoarchive with parameters."); 1876 1865 finish(1); 1877 1866 }
Note:
See TracChangeset
for help on using the changeset viewer.