mirror of
				https://gitee.com/spark-store-project/spark-store
				synced 2025-11-04 00:02:21 +08:00 
			
		
		
		
	修改 pass-auth.sh ,可直接替换pkexec使用
This commit is contained in:
		
							parent
							
								
									831008dcbe
								
							
						
					
					
						commit
						9936b10d37
					
				@ -1,6 +1,3 @@
 | 
				
			|||||||
#!/bin/bash
 | 
					 | 
				
			||||||
# We use sudo twice to avoid ACE bug here 
 | 
					 | 
				
			||||||
# https://gitee.com/amber-ce/amber-ce-bookworm/commit/43e1a1599ede474b37e41aa10c53fd8afc4d35a1
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
#!/bin/bash
 | 
					#!/bin/bash
 | 
				
			||||||
# We use sudo twice to avoid ACE bug here 
 | 
					# We use sudo twice to avoid ACE bug here 
 | 
				
			||||||
@ -14,6 +11,12 @@ function zenity_prompt() {
 | 
				
			|||||||
    fi
 | 
					    fi
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					if [ "${IS_ACE_ENV}" = "" ]; then
 | 
				
			||||||
 | 
					echo "检测为非ACE环境,直接提权"
 | 
				
			||||||
 | 
					pkexec "$@"
 | 
				
			||||||
 | 
					exit $?
 | 
				
			||||||
 | 
					fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# 检查sudo是否需要密码
 | 
					# 检查sudo是否需要密码
 | 
				
			||||||
if sudo -n true 2>/dev/null; then
 | 
					if sudo -n true 2>/dev/null; then
 | 
				
			||||||
    echo "sudo 无需密码,继续执行"
 | 
					    echo "sudo 无需密码,继续执行"
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user