File: macos

package info (click to toggle)
powerpc-utils 1.1.3-25
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 288 kB
  • ctags: 381
  • sloc: ansic: 2,815; makefile: 174; sh: 62
file content (26 lines) | stat: -rwxr-xr-x 520 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/bin/sh

PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/local/bin

# check that we are being run from the console
if ! expr "`tty`" : '^/dev/tty[0-9]$' >/dev/null; then
  echo "Must be run from console"
  exit 1
fi

newworld=0

if [ -f /proc/cpuinfo ]; then
  if grep pmac-generation'.*'NewWorld /proc/cpuinfo >/dev/null 2>/dev/null; then
    newworld=1
  fi
fi

if [ $newworld = 1 ]; then
  nvsetenv boot-device "hd:,\\:tbxi"
else
  nvsetenv boot-device /AAPL,ROM
  nvsetenv real-base ffffffff
fi

exec shutdown -t 1 -r now