From: <ow...@us...> - 2008-09-24 19:30:39
|
Revision: 1932 http://ipcop.svn.sourceforge.net/ipcop/?rev=1932&view=rev Author: owes Date: 2008-09-24 19:30:20 +0000 (Wed, 24 Sep 2008) Log Message: ----------- use UUID for silo Modified Paths: -------------- ipcop/trunk/src/installer/partition.c Modified: ipcop/trunk/src/installer/partition.c =================================================================== --- ipcop/trunk/src/installer/partition.c 2008-09-23 06:50:58 UTC (rev 1931) +++ ipcop/trunk/src/installer/partition.c 2008-09-24 19:30:20 UTC (rev 1932) @@ -466,20 +466,20 @@ mysystem("/bin/sync"); #if defined(__sparc__) || defined(__sparc64__) - /* rmmod/modprobe hack to make hd?3/sd?3 appear */ - if (mysystem("/sbin/rmmod ide-disk") == 0) { - mysystem("/sbin/modprobe ide-disk"); - } - if (mysystem("/sbin/rmmod sd_mod") == 0) { - mysystem("/sbin/modprobe sd_mod"); - } + /* rmmod/modprobe hack to make hd?3/sd?3 appear */ + if (mysystem("/sbin/rmmod ide-disk") == 0) { + mysystem("/sbin modprobe ide-disk"); + } + if (mysystem("/sbin/rmmod sd_mod") == 0) { + mysystem("/sbin modprobe sd_mod"); + } sleep(1); #endif newtPopWindow(); return retcode; -} /* End of int autopart() */ +} /* End of int autopart() */ /* @@ -923,9 +923,17 @@ #if defined (__sparc__) || defined (__sparc64__) fprintf(flog, "Installing silo\n"); - /* replace the ROOT_DEV with the real device, partition 2 */ - snprintf(command, STRING_SIZE, "/bin/sed -i -e 's+ROOT_DEV+%s2+g' /harddisk/etc/silo.conf", device); - mysystem(command); + if (partition_uuidenc[1][0]) { + /* replace the ROOT_DEV with UUID partition 2 */ + snprintf(command, STRING_SIZE, "/bin/sed -i -e 's+ROOT_DEV+UUID=%s+g' /harddisk/etc/silo.conf", + partition_uuidenc[1]); + mysystem(command); + } + else { + /* replace the ROOT_DEV with the real device, partition 2 */ + snprintf(command, STRING_SIZE, "/bin/sed -i -e 's+ROOT_DEV+%s2+g' /harddisk/etc/silo.conf", device); + mysystem(command); + } /* We need to mount /proc/openprom so we can rewrite the boot-device prom variable */ snprintf(command, STRING_SIZE, "/bin/chroot /harddisk /bin/mount /proc/openprom"); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |