Advertisement
tolikpunkoff

lvm2.doinst.sh

Mar 3rd, 2016
597
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 4.70 KB | None | 0 0
  1. #!/bin/sh
  2. config() {
  3.   NEW="$1"
  4.   OLD="`dirname $NEW`/`basename $NEW .new`"
  5.   # If there's no config file by that name, mv it over:
  6.   if [ ! -r $OLD ]; then
  7.     mv $NEW $OLD
  8.   elif [ "`cat $OLD | md5sum`" = "`cat $NEW | md5sum`" ]; then # toss the redundant copy
  9.     rm $NEW
  10.   fi
  11.   # Otherwise, we leave the .new copy for the admin to consider...
  12. }
  13. config etc/lvm/lvm.conf.new
  14. ( cd sbin ; rm -rf vgck )
  15. ( cd sbin ; ln -sf lvm vgck )
  16. ( cd sbin ; rm -rf pvscan )
  17. ( cd sbin ; ln -sf lvm pvscan )
  18. ( cd sbin ; rm -rf vgcfgrestore )
  19. ( cd sbin ; ln -sf lvm vgcfgrestore )
  20. ( cd sbin ; rm -rf vgexport )
  21. ( cd sbin ; ln -sf lvm vgexport )
  22. ( cd sbin ; rm -rf lvcreate )
  23. ( cd sbin ; ln -sf lvm lvcreate )
  24. ( cd sbin ; rm -rf pvremove )
  25. ( cd sbin ; ln -sf lvm pvremove )
  26. ( cd sbin ; rm -rf pvdisplay )
  27. ( cd sbin ; ln -sf lvm pvdisplay )
  28. ( cd sbin ; rm -rf vgs )
  29. ( cd sbin ; ln -sf lvm vgs )
  30. ( cd sbin ; rm -rf lvresize )
  31. ( cd sbin ; ln -sf lvm lvresize )
  32. ( cd sbin ; rm -rf pvs )
  33. ( cd sbin ; ln -sf lvm pvs )
  34. ( cd sbin ; rm -rf lvmsar )
  35. ( cd sbin ; ln -sf lvm lvmsar )
  36. ( cd sbin ; rm -rf pvresize )
  37. ( cd sbin ; ln -sf lvm pvresize )
  38. ( cd sbin ; rm -rf vgrename )
  39. ( cd sbin ; ln -sf lvm vgrename )
  40. ( cd sbin ; rm -rf vgchange )
  41. ( cd sbin ; ln -sf lvm vgchange )
  42. ( cd sbin ; rm -rf pvmove )
  43. ( cd sbin ; ln -sf lvm pvmove )
  44. ( cd sbin ; rm -rf vgcfgbackup )
  45. ( cd sbin ; ln -sf lvm vgcfgbackup )
  46. ( cd sbin ; rm -rf lvextend )
  47. ( cd sbin ; ln -sf lvm lvextend )
  48. ( cd sbin ; rm -rf vgimport )
  49. ( cd sbin ; ln -sf lvm vgimport )
  50. ( cd sbin ; rm -rf vgcreate )
  51. ( cd sbin ; ln -sf lvm vgcreate )
  52. ( cd sbin ; rm -rf lvreduce )
  53. ( cd sbin ; ln -sf lvm lvreduce )
  54. ( cd sbin ; rm -rf vgscan )
  55. ( cd sbin ; ln -sf lvm vgscan )
  56. ( cd sbin ; rm -rf lvs )
  57. ( cd sbin ; ln -sf lvm lvs )
  58. ( cd sbin ; rm -rf vgsplit )
  59. ( cd sbin ; ln -sf lvm vgsplit )
  60. ( cd sbin ; rm -rf pvck )
  61. ( cd sbin ; ln -sf lvm pvck )
  62. ( cd sbin ; rm -rf lvdisplay )
  63. ( cd sbin ; ln -sf lvm lvdisplay )
  64. ( cd sbin ; rm -rf pvcreate )
  65. ( cd sbin ; ln -sf lvm pvcreate )
  66. ( cd sbin ; rm -rf lvmchange )
  67. ( cd sbin ; ln -sf lvm lvmchange )
  68. ( cd sbin ; rm -rf vgextend )
  69. ( cd sbin ; ln -sf lvm vgextend )
  70. ( cd sbin ; rm -rf lvremove )
  71. ( cd sbin ; ln -sf lvm lvremove )
  72. ( cd sbin ; rm -rf lvmdiskscan )
  73. ( cd sbin ; ln -sf lvm lvmdiskscan )
  74. ( cd sbin ; rm -rf lvconvert )
  75. ( cd sbin ; ln -sf lvm lvconvert )
  76. ( cd sbin ; rm -rf lvmsadc )
  77. ( cd sbin ; ln -sf lvm lvmsadc )
  78. ( cd sbin ; rm -rf vgremove )
  79. ( cd sbin ; ln -sf lvm vgremove )
  80. ( cd sbin ; rm -rf pvchange )
  81. ( cd sbin ; ln -sf lvm pvchange )
  82. ( cd sbin ; rm -rf vgmknodes )
  83. ( cd sbin ; ln -sf lvm vgmknodes )
  84. ( cd sbin ; rm -rf lvscan )
  85. ( cd sbin ; ln -sf lvm lvscan )
  86. ( cd sbin ; rm -rf vgreduce )
  87. ( cd sbin ; ln -sf lvm vgreduce )
  88. ( cd sbin ; rm -rf lvrename )
  89. ( cd sbin ; ln -sf lvm lvrename )
  90. ( cd sbin ; rm -rf vgconvert )
  91. ( cd sbin ; ln -sf lvm vgconvert )
  92. ( cd sbin ; rm -rf lvchange )
  93. ( cd sbin ; ln -sf lvm lvchange )
  94. ( cd sbin ; rm -rf vgdisplay )
  95. ( cd sbin ; ln -sf lvm vgdisplay )
  96. ( cd sbin ; rm -rf vgmerge )
  97. ( cd sbin ; ln -sf lvm vgmerge )
  98. ( cd usr/lib ; rm -rf libdevmapper-event-lvm2snapshot.so )
  99. ( cd usr/lib ; ln -sf device-mapper/libdevmapper-event-lvm2snapshot.so libdevmapper-event-lvm2snapshot.so )
  100. ( cd usr/lib ; rm -rf liblvm2cmd.so.2.02 )
  101. ( cd usr/lib ; ln -sf ../../lib/liblvm2cmd.so.2.02 liblvm2cmd.so.2.02 )
  102. ( cd usr/lib ; rm -rf libdevmapper-event-lvm2mirror.so )
  103. ( cd usr/lib ; ln -sf device-mapper/libdevmapper-event-lvm2mirror.so libdevmapper-event-lvm2mirror.so )
  104. ( cd usr/lib ; rm -rf libdevmapper-event-lvm2raid.so )
  105. ( cd usr/lib ; ln -sf device-mapper/libdevmapper-event-lvm2raid.so libdevmapper-event-lvm2raid.so )
  106. ( cd usr/lib ; rm -rf libdevmapper-event.so.1.02 )
  107. ( cd usr/lib ; ln -sf ../../lib/libdevmapper-event.so.1.02 libdevmapper-event.so.1.02 )
  108. ( cd usr/lib ; rm -rf liblvm2cmd.so )
  109. ( cd usr/lib ; ln -sf liblvm2cmd.so.2.02 liblvm2cmd.so )
  110. ( cd usr/lib ; rm -rf liblvm2app.so )
  111. ( cd usr/lib ; ln -sf liblvm2app.so.2.2 liblvm2app.so )
  112. ( cd usr/lib ; rm -rf libdevmapper-event-lvm2.so )
  113. ( cd usr/lib ; ln -sf libdevmapper-event-lvm2.so.2.02 libdevmapper-event-lvm2.so )
  114. ( cd usr/lib ; rm -rf libdevmapper-event-lvm2.so.2.02 )
  115. ( cd usr/lib ; ln -sf ../../lib/libdevmapper-event-lvm2.so.2.02 libdevmapper-event-lvm2.so.2.02 )
  116. ( cd usr/lib ; rm -rf libdevmapper.so )
  117. ( cd usr/lib ; ln -sf libdevmapper.so.1.02 libdevmapper.so )
  118. ( cd usr/lib ; rm -rf libdevmapper.so.1.02 )
  119. ( cd usr/lib ; ln -sf ../../lib/libdevmapper.so.1.02 libdevmapper.so.1.02 )
  120. ( cd usr/lib ; rm -rf liblvm2app.so.2.2 )
  121. ( cd usr/lib ; ln -sf ../../lib/liblvm2app.so.2.2 liblvm2app.so.2.2 )
  122. ( cd usr/lib ; rm -rf libdevmapper-event.so )
  123. ( cd usr/lib ; ln -sf libdevmapper-event.so.1.02 libdevmapper-event.so )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement