Skip to content

Instantly share code, notes, and snippets.

@cbrune
Created October 6, 2014 17:21
Show Gist options
  • Save cbrune/60bf91177ab85a58dd4e to your computer and use it in GitHub Desktop.
Save cbrune/60bf91177ab85a58dd4e to your computer and use it in GitHub Desktop.
ONIE verbose example: onie_verbose=y
The "fake installer" contents:
==============================
#!/bin/sh
echo "Hello"
echo "---- export ----"
export
echo "---- set ----"
set
exit 1
The current kernel command line:
================================
ONIE:/ # cat /proc/cmdline
quiet console=ttyS0,115200 serial_num=fake-serial-0123456789 eth_addr=00:04:9F:02:80:A4 boot_reason=rescue verbose
The installer output:
=====================
ONIE:/ # onie-nos-install http://monster-04/cb/test.sh
Stopping: discover... done.
Running wget with: onie/1.0 (Linux-3.2.35-onie+master-201408220931-dirty; BusyBox-v1.20.0) -T 3 -O /installer http://monster-04/cb/test.sh
Info: Fetching http://monster-04/cb/test.sh ...
Connecting to monster-04 (10.0.1.248:80)
installer 100% |*******************************| 89 0:00:00 ETA
ONIE: Executing installer: http://monster-04/cb/test.sh
Hello
---- export ----
export HOME='/'
export PATH='/sbin:/usr/sbin:/bin:/usr/bin'
export PS1='ONIE:\w # '
export PWD='/'
export RUNLEVEL='verbose'
export SHELL='/bin/sh'
export TERM='vt102'
export USER='root'
export boot_reason='rescue'
export eth_addr='00:04:9F:02:80:A4'
export onie_boot_reason='rescue'
export onie_cli_static_url='http://monster-04/cb/test.sh'
export onie_eth_addr='00:04:9F:02:80:A4'
export onie_exec_url='http://monster-04/cb/test.sh'
export onie_installer='/installer'
export onie_serial_num='fake-serial-0123456789'
export onie_verbose='y'
export serial_num='fake-serial-0123456789'
---- set ----
HOME='/'
IFS='
'
OPTIND='1'
PATH='/sbin:/usr/sbin:/bin:/usr/bin'
PPID='478'
PS1='ONIE:\w # '
PS2='> '
PS4='+ '
PWD='/'
RUNLEVEL='verbose'
SHELL='/bin/sh'
TERM='vt102'
USER='root'
boot_reason='rescue'
eth_addr='00:04:9F:02:80:A4'
onie_boot_reason='rescue'
onie_cli_static_url='http://monster-04/cb/test.sh'
onie_eth_addr='00:04:9F:02:80:A4'
onie_exec_url='http://monster-04/cb/test.sh'
onie_installer='/installer'
onie_serial_num='fake-serial-0123456789'
onie_verbose='y'
serial_num='fake-serial-0123456789'
ONIE:/ # onie-sysinfo
powerpc-fsl_p2020rdbpca-r0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment