mirror of
https://github.com/palera1n/palera1n.git
synced 2026-10-23 18:49:48 +02:00
add wsl/vm checks (#326)
This commit is contained in:
1 parent
efb5ce48c3
commit
785c3a515f
1 file changed
+24
+24
@@ -32,6 +32,28 @@ fs=disk0s1s$disk
|
|||||||
# =========
|
# =========
|
||||||
# Functions
|
# Functions
|
||||||
# =========
|
# =========
|
||||||
|
|
||||||
|
check_wsl(){
|
||||||
|
check=`uname -r | grep "microsoft"`
|
||||||
|
if [[ $check != "" ]]; then
|
||||||
|
echo "This looks like a WSL Linux machine"
|
||||||
|
echo "Remember that NO support is given whatsover"
|
||||||
|
echo "with WSL/VM"
|
||||||
|
read -p "Continue? (y/N): " confirm && [[ $confirm == [yY] || $confirm == [yY][eE][sS] ]] || exit 0
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
check_vm(){
|
||||||
|
if [[ `hostnamectl | grep "Chassis: vm"` != "" ]]
|
||||||
|
then
|
||||||
|
echo "This looks like a VM Linux machine (or you don't have systemd)"
|
||||||
|
echo "We do not give support to users using VMs"
|
||||||
|
echo "If you simply don't have systemd, we do offer support."
|
||||||
|
echo "Otherwise, we do not give support in any shape or form"
|
||||||
|
read -p "Continue? (y/N): " confirm && [[ $confirm == [yY] || $confirm == [yY][eE][sS] ]] || exit 1
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
remote_cmd() {
|
remote_cmd() {
|
||||||
"$dir"/sshpass -p 'alpine' ssh -o StrictHostKeyChecking=no -p6413 root@localhost "$@"
|
"$dir"/sshpass -p 'alpine' ssh -o StrictHostKeyChecking=no -p6413 root@localhost "$@"
|
||||||
}
|
}
|
||||||
@@ -361,6 +383,8 @@ fi
|
|||||||
# ============
|
# ============
|
||||||
# Dependencies
|
# Dependencies
|
||||||
# ============
|
# ============
|
||||||
|
check_wsl
|
||||||
|
check_vm
|
||||||
|
|
||||||
# Check for required commands
|
# Check for required commands
|
||||||
if [ "$os" = 'Linux' ]; then
|
if [ "$os" = 'Linux' ]; then
|
||||||
|
|||||||
Reference in new issue
Block a user