Last active
August 5, 2021 07:46
-
-
Save sulincix/daf2f7a02f47ade84cccc4a6a866266e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# This script revoke usrmerge. | |
# You must save your unsaved files before run. | |
# System or applications may crash during process. | |
# You must reboot after script finished. | |
# This script is experimental. | |
set +e | |
apt-get install busybox-static -yq || exit 1 | |
cp /bin/busybox /busybox | |
[[ -d /var/lib/dpkg/info/ ]] || exit 1 | |
for dir in lib bin sbin lib32 lib64 libx32 ; do | |
/busybox rm -f /$dir && /busybox mkdir /$dir | |
/busybox cat /var/lib/dpkg/info/*.list | /busybox grep "^/$dir" | while read line ; do | |
nd="$(/busybox dirname $line)" | |
[[ ! -d "$nd" ]] && /busybox mkdir -p "$nd" | |
[[ ! -d "/usr/$line" ]] && /busybox mv /usr/$line $line | |
done | |
done | |
depmod -a | |
reboot -f |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment