summaryrefslogtreecommitdiff
path: root/meta-openpower/recipes-phosphor/network/first-boot-set-mac/first-boot-set-mac.sh
diff options
context:
space:
mode:
Diffstat (limited to 'meta-openpower/recipes-phosphor/network/first-boot-set-mac/first-boot-set-mac.sh')
-rwxr-xr-xmeta-openpower/recipes-phosphor/network/first-boot-set-mac/first-boot-set-mac.sh10
1 files changed, 7 insertions, 3 deletions
diff --git a/meta-openpower/recipes-phosphor/network/first-boot-set-mac/first-boot-set-mac.sh b/meta-openpower/recipes-phosphor/network/first-boot-set-mac/first-boot-set-mac.sh
index 9f751a6c3..9668ed5f1 100755
--- a/meta-openpower/recipes-phosphor/network/first-boot-set-mac/first-boot-set-mac.sh
+++ b/meta-openpower/recipes-phosphor/network/first-boot-set-mac/first-boot-set-mac.sh
@@ -1,7 +1,11 @@
#!/bin/sh -eu
show_error() {
- logger -p user.error -t bmc-first-init $@
+ if [ -n "${JOURNAL_STREAM-}" ]; then
+ echo "$@" | systemd-cat -t first-boot-set-mac -p emerg
+ else
+ echo "$@" >&2
+ fi
}
sync_mac() {
@@ -47,8 +51,8 @@ sync_mac() {
fi
}
-if [ $# -eq 0 ]
- then echo 'No Ethernet interface name is given'
+if [ $# -eq 0 ]; then
+ show_error 'No Ethernet interface name is given'
exit 1
fi