Changeset 92628 in vbox
- Timestamp:
- Nov 29, 2021 3:56:02 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Installer/linux/uninstall.sh
r91857 r92628 39 39 40 40 # Find previous installation 41 if [ -r $CONFIG_DIR/$CONFIG]; then42 . $CONFIG_DIR/$CONFIG43 PREV_INSTALLATION= $INSTALL_DIR41 if [ -r "$CONFIG_DIR/$CONFIG" ]; then 42 . "$CONFIG_DIR/$CONFIG" 43 PREV_INSTALLATION="$INSTALL_DIR" 44 44 fi 45 45 … … 56 56 # Remove kernel module installed 57 57 if [ -z "$VBOX_DONT_REMOVE_OLD_MODULES" ]; then 58 rm -f /usr/src/vboxhost-$INSTALL_VER2> /dev/null59 rm -f /usr/src/vboxdrv-$INSTALL_VER2> /dev/null60 rm -f /usr/src/vboxnetflt-$INSTALL_VER2> /dev/null61 rm -f /usr/src/vboxnetadp-$INSTALL_VER2> /dev/null62 rm -f /usr/src/vboxpci-$INSTALL_VER2> /dev/null58 rm -f "/usr/src/vboxhost-$INSTALL_VER" 2> /dev/null 59 rm -f "/usr/src/vboxdrv-$INSTALL_VER" 2> /dev/null 60 rm -f "/usr/src/vboxnetflt-$INSTALL_VER" 2> /dev/null 61 rm -f "/usr/src/vboxnetadp-$INSTALL_VER" 2> /dev/null 62 rm -f "/usr/src/vboxpci-$INSTALL_VER" 2> /dev/null 63 63 fi 64 64 … … 99 99 /usr/bin/vboxaudiotest \ 100 100 /usr/bin/vboxbugreport \ 101 $PREV_INSTALLATION/components/VBoxVMM.so\102 $PREV_INSTALLATION/components/VBoxREM.so\103 $PREV_INSTALLATION/components/VBoxRT.so\104 $PREV_INSTALLATION/components/VBoxDDU.so\105 $PREV_INSTALLATION/components/VBoxXPCOM.so\106 $PREV_INSTALLATION/VBoxREM.so\107 $PREV_INSTALLATION/VBoxVRDP\108 $PREV_INSTALLATION/VBoxVRDP.so\101 "$PREV_INSTALLATION/components/VBoxVMM.so" \ 102 "$PREV_INSTALLATION/components/VBoxREM.so" \ 103 "$PREV_INSTALLATION/components/VBoxRT.so" \ 104 "$PREV_INSTALLATION/components/VBoxDDU.so" \ 105 "$PREV_INSTALLATION/components/VBoxXPCOM.so" \ 106 "$PREV_INSTALLATION/VBoxREM.so" \ 107 "$PREV_INSTALLATION/VBoxVRDP" \ 108 "$PREV_INSTALLATION/VBoxVRDP.so" \ 109 109 2> /dev/null 110 110 111 111 cwd=`pwd` 112 if [ -f $PREV_INSTALLATION/src/Makefile]; then113 cd $PREV_INSTALLATION/src112 if [ -f "$PREV_INSTALLATION/src/Makefile" ]; then 113 cd "$PREV_INSTALLATION/src" 114 114 make clean > /dev/null 2>&1 115 115 fi 116 if [ -f $PREV_INSTALLATION/src/vboxdrv/Makefile]; then117 cd $PREV_INSTALLATION/src/vboxdrv116 if [ -f "$PREV_INSTALLATION/src/vboxdrv/Makefile" ]; then 117 cd "$PREV_INSTALLATION/src/vboxdrv" 118 118 make clean > /dev/null 2>&1 119 119 fi 120 if [ -f $PREV_INSTALLATION/src/vboxnetflt/Makefile]; then121 cd $PREV_INSTALLATION/src/vboxnetflt120 if [ -f "$PREV_INSTALLATION/src/vboxnetflt/Makefile" ]; then 121 cd "$PREV_INSTALLATION/src/vboxnetflt" 122 122 make clean > /dev/null 2>&1 123 123 fi 124 if [ -f $PREV_INSTALLATION/src/vboxnetadp/Makefile]; then125 cd $PREV_INSTALLATION/src/vboxnetadp124 if [ -f "$PREV_INSTALLATION/src/vboxnetadp/Makefile" ]; then 125 cd "$PREV_INSTALLATION/src/vboxnetadp" 126 126 make clean > /dev/null 2>&1 127 127 fi 128 if [ -f $PREV_INSTALLATION/src/vboxpci/Makefile]; then129 cd $PREV_INSTALLATION/src/vboxpci128 if [ -f "$PREV_INSTALLATION/src/vboxpci/Makefile" ]; then 129 cd "$PREV_INSTALLATION/src/vboxpci" 130 130 make clean > /dev/null 2>&1 131 131 fi 132 cd $PREV_INSTALLATION133 if [ -r $CONFIG_DIR/$CONFIG_FILES]; then134 rm -f `cat $CONFIG_DIR/$CONFIG_FILES` 2> /dev/null132 cd "$PREV_INSTALLATION" 133 if [ -r "$CONFIG_DIR/$CONFIG_FILES" ]; then 134 rm -f `cat "$CONFIG_DIR/$CONFIG_FILES"` 2> /dev/null 135 135 elif [ -n "$DEFAULT_FILES" -a -r "$DEFAULT_FILES" ]; then 136 136 DEFAULT_FILE_NAMES="" 137 . $DEFAULT_FILES 138 for i in "$DEFAULT_FILE_NAMES"; do 139 rm -f $i 2> /dev/null 140 done 137 . "$DEFAULT_FILES" 138 rm -f $DEFAULT_FILE_NAMES 2> /dev/null 141 139 fi 142 for file in `find $PREV_INSTALLATION2> /dev/null`; do143 rmdir -p $file2> /dev/null140 for file in `find "$PREV_INSTALLATION" 2> /dev/null`; do 141 rmdir -p "$file" 2> /dev/null 144 142 done 145 cd $cwd 146 mkdir -p $PREV_INSTALLATION 2> /dev/null # The above actually removes the current directory and parents! 147 rmdir $PREV_INSTALLATION 2> /dev/null 148 rm -r $CONFIG_DIR/$CONFIG 2> /dev/null 143 cd "$cwd" 144 mkdir -p "$PREV_INSTALLATION" 2> /dev/null # The above actually removes the current directory and parents! 145 rmdir "$PREV_INSTALLATION" 2> /dev/null 146 rm -f "$CONFIG_DIR/$CONFIG" 2> /dev/null 147 rm -f "$CONFIG_DIR/$CONFIG_FILES" 2> /dev/null 148 rmdir "$CONFIG_DIR" 2> /dev/null 149 150 update-mime-database /usr/share/mime >/dev/null 2>&1 149 151 150 152 if [ -z "$VBOX_NO_UNINSTALL_MESSAGE" ]; then 151 rm -r $CONFIG_DIR/$CONFIG_FILES 2> /dev/null152 rmdir $CONFIG_DIR 2> /dev/null153 153 [ -n "$INSTALL_REV" ] && INSTALL_REV=" r$INSTALL_REV" 154 154 info "VirtualBox $INSTALL_VER$INSTALL_REV has been removed successfully." 155 155 log "Successfully $INSTALL_VER$INSTALL_REV removed VirtualBox." 156 156 fi 157 update-mime-database /usr/share/mime >/dev/null 2>&1
Note:
See TracChangeset
for help on using the changeset viewer.