Author: aschnell Date: Wed Aug 20 15:10:08 2008 New Revision: 50235 URL: http://svn.opensuse.org/viewcvs/yast?rev=50235&view=rev Log: - cleanup Modified: trunk/storage/libstorage/src/Dm.cc trunk/storage/libstorage/src/Md.cc trunk/storage/libstorage/src/StorageDefines.h trunk/storage/libstorage/src/Volume.cc Modified: trunk/storage/libstorage/src/Dm.cc URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/libstorage/src/Dm.cc?rev=50235&r1=50234&r2=50235&view=diff ============================================================================== --- trunk/storage/libstorage/src/Dm.cc (original) +++ trunk/storage/libstorage/src/Dm.cc Wed Aug 20 15:10:08 2008 @@ -444,10 +444,10 @@ { c.execute("grep \"^dm[-_]mod[ \t]\" /proc/modules"); if( c.numLines()<=0 ) - c.execute("modprobe dm-mod"); + c.execute(MODPROBEBIN " dm-mod"); c.execute("grep \"^dm[-_]snapshot[ \t]\" /proc/modules"); if( c.numLines()<=0 ) - c.execute("modprobe dm-snapshot"); + c.execute(MODPROBEBIN " dm-snapshot"); c.execute("/sbin/devmap_mknod.sh"); } } Modified: trunk/storage/libstorage/src/Md.cc URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/libstorage/src/Md.cc?rev=50235&r1=50234&r2=50235&view=diff ============================================================================== --- trunk/storage/libstorage/src/Md.cc (original) +++ trunk/storage/libstorage/src/Md.cc Wed Aug 20 15:10:08 2008 @@ -311,25 +311,28 @@ *i = nw; } -string Md::createCmd() const - { + +string +Md::createCmd() const +{ string cmd = "ls -l --full-time " + quote(devs) + " " + quote(spare) + "; "; - cmd += "modprobe " + pName() + "; " MDADMBIN " --create " + quote(device()) + - " --run --level=" + pName() + " -e 1.0"; + cmd += MODPROBEBIN " " + pName() + "; " MDADMBIN " --create " + quote(device()) + + " --run --level=" + pName() + " -e 1.0"; if (pName() == "raid1" || pName() == "raid5" || pName() == "raid6" || pName() == "raid10") - cmd += " -b internal"; - if( chunk>0 ) + cmd += " -b internal"; + if (chunk > 0) cmd += " --chunk=" + decString(chunk); - if( md_parity!=PAR_NONE ) + if (md_parity != PAR_NONE) cmd += " --parity=" + ptName(); cmd += " --raid-devices=" + decString(devs.size()); - if( !spare.empty() ) + if (!spare.empty()) cmd += " --spare-devices=" + decString(spare.size()); cmd += " " + quote(devs) + " " + quote(spare); - y2milestone( "ret:%s", cmd.c_str() ); - return( cmd ); - } + y2mil("ret:" << cmd); + return cmd; +} + string Md::mdadmLine() const { Modified: trunk/storage/libstorage/src/StorageDefines.h URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/libstorage/src/StorageDefines.h?rev=50235&r1=50234&r2=50235&view=diff ============================================================================== --- trunk/storage/libstorage/src/StorageDefines.h (original) +++ trunk/storage/libstorage/src/StorageDefines.h Wed Aug 20 15:10:08 2008 @@ -48,5 +48,7 @@ #define UDEVSETTLEBIN "/sbin/udevsettle" +#define MODPROBEBIN "/sbin/modprobe" + #endif Modified: trunk/storage/libstorage/src/Volume.cc URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/libstorage/src/Volume.cc?rev=50235&r1=50234&r2=50235&view=diff ============================================================================== --- trunk/storage/libstorage/src/Volume.cc (original) +++ trunk/storage/libstorage/src/Volume.cc Wed Aug 20 15:10:08 2008 @@ -1677,7 +1677,7 @@ quote(cont->getStorage()->root() + lfile)); } string cmd = getCryptsetupCmd( try_order[pos], dmcrypt_dev, "", fname, false ); - c.execute( "modprobe dm-crypt" ); + c.execute(MODPROBEBIN " dm-crypt"); c.execute( cmd ); string use_dev = dmcrypt_dev; if( c.retcode()==0 ) @@ -1708,7 +1708,7 @@ ok, c.retcode(), excTime, excLines ); if( ok ) { - c.execute( "modprobe " + fs_names[detected_fs] ); + c.execute(MODPROBEBIN " " + fs_names[detected_fs]); c.execute(MOUNTBIN " -oro -t " + fsTypeString(detected_fs) + " " + quote(use_dev) + " " + quote(mpname)); ok = c.retcode()==0; @@ -2119,15 +2119,15 @@ fsn = "auto"; break; default: - cmdline = "modprobe " + fsn; + cmdline = MODPROBEBIN " " + fsn; cmd.execute( cmdline ); break; } if( fs == VFAT ) { - cmdline = "modprobe nls_cp437"; + cmdline = MODPROBEBIN " nls_cp437"; cmd.execute( cmdline ); - cmdline = "modprobe nls_iso8859-1"; + cmdline = MODPROBEBIN " nls_iso8859-1"; cmd.execute( cmdline ); } cmdline = MOUNTBIN " "; -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org