Skip to content

Commit

Permalink
Merge pull request #49 from RandomCoderOrg/option-to-reinstall-fixes
Browse files Browse the repository at this point in the history
add options to reinstall fixes
SaicharanKandukuri authored Sep 7, 2023
2 parents 8f5765d + 8680f0e commit ebd2ed7
Showing 2 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions udroid/src/help_udroid.sh
Original file line number Diff line number Diff line change
@@ -20,6 +20,7 @@ help_login() {
echo " --isolated: Creates an isolated environment for the filesystem."
echo " --ashmem-memfd | --memfd enable support for memfd emulation through ashmem ( experimental )"
echo " --fix-low-ports: Fixes low ports for the filesystem."
echo " --reinstall-fixes: reinstall proot fixes before login"
echo " --no-shared-tmp: Disables shared tmp for the filesystem."
echo " --no-link2symlink: Disables link2symlink for the filesystem."
echo " --no-sysvipc: Disables sysvipc for the filesystem."
8 changes: 8 additions & 0 deletions udroid/src/udroid.sh
Original file line number Diff line number Diff line change
@@ -369,6 +369,7 @@ login() {
local login_user="root"
local run_script=""
local is_custom_distro=false
local reinstall_fixes=false
local custom_distro_name=""
local -a custom_fs_bindings
local path=$DEFAULT_FS_INSTALL_DIR
@@ -467,6 +468,9 @@ login() {
is_custom_distro=true;
custom_distro_name=$2; shift 2
;;
--reinstall-fixes)
reinstall_fixes=true; shift
;;
-*)
echo "Unknown option: $1"
exit 1
@@ -510,6 +514,10 @@ login() {
[[ -z $distro ]] && echo "ERROR: distro not specified" && exit 1

if [ -d $path/$distro ]; then
# reinstall fixes
if $reinstall_fixes; then
bash proot-utils/proot-fixes.sh "$root_fs_path"
fi
# set PROOT_L2S_DIR
if [ -d "${root_fs_path}/.l2s" ]; then
export PROOT_L2S_DIR="${root_fs_path}/.l2s"

0 comments on commit ebd2ed7

Please sign in to comment.