Inital commit
This commit is contained in:
13
lib/root
Normal file
13
lib/root
Normal file
@@ -0,0 +1,13 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
rsudo () {
|
||||
. /etc/os-release
|
||||
|
||||
RHEL_MAJOR_VERSION=$(echo "$VERSION_ID" | cut -d'.' -f1)
|
||||
|
||||
if [ "$RHEL_MAJOR_VERSION" -eq 7 ]; then
|
||||
sudo -i /bin/bash -c ". ${WHOIAM}; exec bash"
|
||||
else
|
||||
sudo machinectl shell root@.host /bin/bash -c ". /etc/profile; . ${WHOIAM}; exec bash"
|
||||
fi
|
||||
}
|
||||
Reference in New Issue
Block a user