3 # Move a new kernel, previously generated, into place
7 if [ $(id -u) -ne 0 ]; then
8 print -u2 "$me: Error: Must be root to execute this command!"
12 OS=$(/bin/uname -r | /usr/bin/cut -f2 -d.)
21 kernel_1_source=/stand/build/vmunix_test
22 kernel_2_source=/stand/build/system.SAM
23 kernel_1_destination=/stand/vmunix
24 kernel_2_destination=/stand/system
27 kernel_1_source=/etc/conf/hp-ux
28 kernel_2_source=/etc/conf/dfile.SAM
29 kernel_1_destination=/hp-ux
30 kernel_2_destination=/etc/conf/dfile
33 print -u2 "$me: Error: Unable to determine OS level: $OS"
38 if [ -f $kernel_1_source -a -f $kernel_2_source ]; then
40 print "New kernel found, move into place (Y/n)?\c"
42 if [ "$answer" = "y" -o "$answer" = "Y" ]; then
43 print -u2 "Moving kernel into place..."
44 mv $kernel_1_source $kernel_1_destination
45 mv $kernel_2_source $kernel_2_destination
47 print "WARNING: kernel not moved into place!"
51 print "Restart system (Y/n)?\c"
53 if [ "$answer" = "y" -o "$answer" = "Y" ]; then
57 print "System not restarted"
61 print -u2 "$me: Error: Unable to find new kernel files:"
62 print -u2 "\t$kernel_1_source"
63 print -u2 "\t$kernel_2_source"