This website works better with JavaScript.
Home
Explore
Help
Sign In
mh
/
lc-coreboot
Watch
1
Star
0
Fork
0
Code
Releases
28
Wiki
Activity
Browse Source
modify scripts to fallback to traditional commands if no systemd
pull/151/head
Benjamin Slade
4 years ago
parent
106d9ff19a
commit
26895a03d7
3 changed files
with
12 additions
and
4 deletions
Split View
Diff Options
Show Stats
Download Patch File
Download Diff File
+8
-0
util/functions.sh
+2
-2
x230/x230_heads.sh
+2
-2
x230/x230_skulls.sh
+ 8
- 0
util/functions.sh
View File
@ -57,3 +57,11 @@ warn_not_root() {
echo
-e
"
${
YELLOW
}
WARNING:
${
NC
}
This should not be executed as root!
"
fi
}
poweroff
(
)
{
if
command
-v systemctl 2>/dev/null
;
then
systemctl poweroff
else
shutdown -P now
fi
}
+ 2
- 2
x230/x230_heads.sh
View File
@ -155,8 +155,8 @@ rm -rf ${OUTPUT_PATH}
while
true
;
do
read
-r -p
"Power off now? (please do!) Y/n: "
yn
case
$yn
in
[
Yy
]
*
)
systemctl
poweroff
;
;
[
Yy
]
*
)
poweroff
;
;
[
Nn
]
*
)
exit
;
;
*
)
systemctl
poweroff
;
;
*
)
poweroff
;
;
esac
done
+ 2
- 2
x230/x230_skulls.sh
View File
@ -217,8 +217,8 @@ rm -rf ${OUTPUT_PATH}
while
true
;
do
read
-r -p
"Power off now? (please do!) Y/n: "
yn
case
$yn
in
[
Yy
]
*
)
systemctl
poweroff
;
;
[
Yy
]
*
)
poweroff
;
;
[
Nn
]
*
)
exit
;
;
*
)
systemctl
poweroff
;
;
*
)
poweroff
;
;
esac
done
Write
Preview
Loading…
Cancel
Save