summaryrefslogtreecommitdiff
path: root/modereset
diff options
context:
space:
mode:
authorV3n3RiX <venerix@rogentos.ro>2016-04-20 19:33:59 +0100
committerV3n3RiX <venerix@rogentos.ro>2016-04-20 19:33:59 +0100
commitaf26936d648563d8003a1d19fb170b90992fd3bf (patch)
tree3e5bc55b671baf556a28845042bd176c180bc3c3 /modereset
parent4baf0ea369a74c341cc21b27ac1cbfec08bf1165 (diff)
fix : greping so many files and feeding them to rm will trigger kernel ARG_MAX when switching from devmode to usermode
Diffstat (limited to 'modereset')
-rwxr-xr-xmodereset2
1 files changed, 1 insertions, 1 deletions
diff --git a/modereset b/modereset
index 84b0d35..166421e 100755
--- a/modereset
+++ b/modereset
@@ -5,7 +5,7 @@ export local confdir="/etc/portage"
reset_current_mode() {
if [ -d ""$portagedir"/.git" ] ; then
- rm -rf $(find "$portagedir" -mindepth 1 | grep -v "distfiles" | grep -v "packages")
+ find "$portagedir" -mindepth 1 -name "packages" -prune -o -name "distfiles" -prune -o -exec rm -rf {} \; > /dev/null 2>&1
rm ""$confdir"/make.conf"
rm ""$confdir"/make.profile"
rm "$confdir"