Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Telegram, sd* resizing, Docker
- Loading branch information
NEMS Linux
committed
Sep 5, 2019
1 parent
16e4c2b
commit 5afff61
Showing
2 changed files
with
35 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#!/bin/bash | ||
fulldev=`/bin/mount | /bin/sed -n 's|^/dev/\(.*\) on / .*|\1|p'` | ||
fulldev="sda1" | ||
if [[ $fulldev == "" ]]; then | ||
echo "Could not determine your root device." | ||
exit 1 | ||
fi | ||
|
||
rootdev=`echo $fulldev | cut -d "p" -f 1` | ||
if [[ $rootdev == $fulldev ]]; then | ||
rootdev="${fulldev//[!a-z]/}" | ||
fi | ||
|
||
rootpart=`echo $fulldev | cut -d "p" -f 2` | ||
if [[ $rootpart == $fulldev ]]; then | ||
rootpart="${fulldev//[!0-9]/}" | ||
fi | ||
|
||
|
||
echo $rootdev | ||
echo $rootpart |