Equalize test configs with stable
This commit is contained in:
parent
8759db5073
commit
1210a3828a
4 changed files with 12 additions and 14 deletions
|
@ -1,12 +1,12 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
if [[ ! $EUID -eq 0 ]]; then
|
# Elevate permissions to root
|
||||||
printf 'You have to be root to perform this action.\n'
|
[[ $EUID -eq 0 ]] || exec sudo bash $0 $@
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
# If -r is defined do not check, we may be running pacstrap
|
[[ $@ =~ (-r|--root) ]] && no_check=1 # Do not check if custom root is defined
|
||||||
if [[ ! $@ =~ (-r|--root) ]]; then
|
[[ $LD_LIBRARY_PATH =~ (libfakeroot) ]] && no_check=1 # Do not check if running as fakeroot
|
||||||
|
|
||||||
|
if [[ ! $no_check ]]; then
|
||||||
# Check if the disk is ro'ed using subvolume properties
|
# Check if the disk is ro'ed using subvolume properties
|
||||||
if btrfs property get / 2> /dev/null | grep -q 'ro=true'; then
|
if btrfs property get / 2> /dev/null | grep -q 'ro=true'; then
|
||||||
cat <<- END
|
cat <<- END
|
||||||
|
@ -28,4 +28,3 @@ fi
|
||||||
|
|
||||||
# No exit statement here, we return pacman's exit code
|
# No exit statement here, we return pacman's exit code
|
||||||
/usr/bin/pacman $@
|
/usr/bin/pacman $@
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
if [[ ! $EUID -eq 0 ]]; then
|
# Elevate permissions to root
|
||||||
printf 'You have to be root to perform this action.\n'
|
[[ $EUID -eq 0 ]] || exec sudo bash $0 $@
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
# If -r is defined do not check, we may be running pacstrap
|
[[ $@ =~ (-r|--root) ]] && no_check=1 # Do not check if custom root is defined
|
||||||
if [[ ! $@ =~ (-r|--root) ]]; then
|
[[ $LD_LIBRARY_PATH =~ (libfakeroot) ]] && no_check=1 # Do not check if running as fakeroot
|
||||||
|
|
||||||
|
if [[ ! $no_check ]]; then
|
||||||
# Check if the disk is ro'ed using subvolume properties
|
# Check if the disk is ro'ed using subvolume properties
|
||||||
if btrfs property get / 2> /dev/null | grep -q 'ro=true'; then
|
if btrfs property get / 2> /dev/null | grep -q 'ro=true'; then
|
||||||
cat <<- END
|
cat <<- END
|
||||||
|
@ -28,4 +28,3 @@ fi
|
||||||
|
|
||||||
# No exit statement here, we return pacman's exit code
|
# No exit statement here, we return pacman's exit code
|
||||||
/usr/bin/pacman $@
|
/usr/bin/pacman $@
|
||||||
|
|
Loading…
Add table
Reference in a new issue