X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;ds=sidebyside;f=build%2Fosxpack%2Funinstall_lustre;fp=build%2Fosxpack%2Funinstall_lustre;h=d2624d2d3ad51064ecdea3b73509181e2a87f4e0;hb=99c0ea0ee0d46802034f417575f880417bc22746;hp=aa0f02c2210e2d05a85d7272abced59b94e8c043;hpb=deebfec5bfefc19941bc28c36bc99e3c986690e6;p=fs%2Flustre-release.git diff --git a/build/osxpack/uninstall_lustre b/build/osxpack/uninstall_lustre index aa0f02c..d2624d2 100755 --- a/build/osxpack/uninstall_lustre +++ b/build/osxpack/uninstall_lustre @@ -11,24 +11,24 @@ fi echo "unloading modules......" /sbin/unload_lustre 2 > /dev/null -backpath=/System/LustreBackup -if ! [ -d $backpath ]; then +backdir=/System/LustreBackup/SystemBackup +if ! [ -d $backdir ]; then echo "No backup directory is found, you have not installed lustre or uninstall failed!" exit 1 fi -if ! [ -f $backpath/lustre-current ]; then - echo "No version information of Lustre installation, you have uninstalled or uninstall failed!" - exit 2 -fi - +# if ! [ -f $backpath/lustre-current ]; then +# echo "No version information of Lustre installation, you have uninstalled or uninstall failed!" +# exit 2 +# fi +# # get information of the the backup system - -backdir=`tail -1 $backpath/lustre-current` -if ! [ -d $backdir ]; then - echo "Miss backup directory, uninstall failed!" - exit 3 -fi +# +# backdir=`tail -1 $backpath/lustre-current` +# if ! [ -d $backdir ]; then +# echo "Miss backup directory, uninstall failed!" +# exit 3 +# fi # recover the old system echo "recover orignal kernel......" @@ -69,18 +69,23 @@ cp -f $backdir/usr/lib/libIOKit.A.dylib /usr/lib/libIOKit.A.dylib cp -f $backdir/usr/lib/libIOKit.dylib /usr/lib/libIOKit.dylib cp -f $backdir/usr/lib/libkmod.a /usr/lib/libkmod.a cp -f $backdir/usr/lib/libkmodc++.a /usr/lib/libkmodc++.a - -# -cp $backpath/lustre-current /tmp/lustre-v -count=`grep "SystemBackup" /tmp/lustre-v|wc -l` -count=`expr $count - 1` -if [ $count -gt 0 ]; then - head -$count /tmp/lustre-v > $backpath/lustre-current +if [ -f $backdir/private/etc/sysctl.conf ]; then + cp -f $backdir/private/etc/sysctl.conf /private/etc/sysctl.conf else - # The file should be empty now, it's the last uninstall - rm -f $backpath/lustre-current + rm -f /private/etc/sysctl.conf fi -rm -f /tmp/lustre-v + +# +# cp $backpath/lustre-current /tmp/lustre-v +# count=`grep "SystemBackup" /tmp/lustre-v|wc -l` +# count=`expr $count - 1` +# if [ $count -gt 0 ]; then +# head -$count /tmp/lustre-v > $backpath/lustre-current +# else +# # The file should be empty now, it's the last uninstall +# rm -f $backpath/lustre-current +# fi +# rm -f /tmp/lustre-v # remove unused files echo "uninstall lustre modules and utilities......"