FreeBSD Bugzilla – Attachment 118309 Details for
Bug 160530
[nanobsd] [patch] remove hardcoding of slice names
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
file.diff
file.diff (text/plain), 2.78 KB, created by
Enji Cooper
on 2011-09-07 00:10:04 UTC
(
hide
)
Description:
file.diff
Filename:
MIME Type:
Creator:
Enji Cooper
Created:
2011-09-07 00:10:04 UTC
Size:
2.78 KB
patch
obsolete
>Index: tools/tools/nanobsd/Files/root/updatep1 >=================================================================== >--- tools/tools/nanobsd/Files/root/updatep1 (revision 224946) >+++ tools/tools/nanobsd/Files/root/updatep1 (working copy) >@@ -32,23 +32,26 @@ > # ssh somewhere cat image.s1 | sh updatep1 > # > >+PARTNUM=1 >+OTHER_PARTNUM=2 >+ > set -e > > . /etc/nanobsd.conf > >-if mount | grep ${NANO_DRIVE}s1 > /dev/null ; then >- echo "You are running partition 1 already" >- echo "you probably want to use 'updatep2' instead" >+if mount | grep ${NANO_DRIVE}s$PARTNUM > /dev/null ; then >+ echo "You are running partition $PARTNUM already" >+ echo "you probably want to use 'updatep$OTHER_PARTNUM' instead" > exit 1 > fi > > # Blow away old system. >-dd if=/dev/zero of=/dev/${NANO_DRIVE}s1 bs=1m count=1 > /dev/null 2>&1 >+dd if=/dev/zero of=/dev/${NANO_DRIVE}s$PARTNUM bs=1m count=1 > /dev/null 2>&1 > > # Copy in new system >-dd of=/dev/${NANO_DRIVE}s1 obs=64k >+dd of=/dev/${NANO_DRIVE}s$PARTNUM obs=64k > > # Check that it worked >-fsck_ffs -n /dev/${NANO_DRIVE}s1a >+fsck_ffs -n /dev/${NANO_DRIVE}s${PARTNUM}a > >-gpart set -a active -i 1 ${NANO_DRIVE} >+gpart set -a active -i $PARTNUM ${NANO_DRIVE} >Index: tools/tools/nanobsd/Files/root/updatep2 >=================================================================== >--- tools/tools/nanobsd/Files/root/updatep2 (revision 224946) >+++ tools/tools/nanobsd/Files/root/updatep2 (working copy) >@@ -32,30 +32,33 @@ > # ssh somewhere cat image.s1 | sh updatep2 > # > >+PARTNUM=2 >+OTHER_PARTNUM=1 >+ > set -e > > . /etc/nanobsd.conf > >-if mount | grep ${NANO_DRIVE}s2 > /dev/null ; then >- echo "You are running partition 2 already" >- echo "you probably want to use 'updatep1' instead" >+if mount | grep ${NANO_DRIVE}s$PARTNUM > /dev/null ; then >+ echo "You are running partition $PARTNUM already" >+ echo "you probably want to use 'updatep$OTHER_PARTNUM' instead" > exit 1 > fi > > # Blow away old system. >-dd if=/dev/zero of=/dev/${NANO_DRIVE}s2 bs=1m count=1 > /dev/null 2>&1 >+dd if=/dev/zero of=/dev/${NANO_DRIVE}s$PARTNUM bs=1m count=1 > /dev/null 2>&1 > > # Copy in new system >-dd of=/dev/${NANO_DRIVE}s2 obs=64k >+dd of=/dev/${NANO_DRIVE}s$PARTNUM obs=64k > > # Check that it worked >-fsck_ffs -n /dev/${NANO_DRIVE}s2a >+fsck_ffs -n /dev/${NANO_DRIVE}s${PARTNUM}a > > # Update the /etc/fstab > trap "umount /mnt" 1 2 15 EXIT >-mount /dev/${NANO_DRIVE}s2a /mnt >-sed -i "" "s/${NANO_DRIVE}s1/${NANO_DRIVE}s2/" /mnt/conf/base/etc/fstab >-sed -i "" "s/${NANO_DRIVE}s1/${NANO_DRIVE}s2/" /mnt/etc/fstab >+mount /dev/${NANO_DRIVE}s${PARTNUM}a /mnt >+sed -i "" "s/${NANO_DRIVE}s$OTHER_PARTNUM/${NANO_DRIVE}s$PARTNUM/" /mnt/conf/base/etc/fstab >+sed -i "" "s/${NANO_DRIVE}s$OTHER_PARTNUM/${NANO_DRIVE}s$PARTNUM/" /mnt/etc/fstab > umount /mnt > trap 1 2 15 EXIT >-gpart set -a active -i 2 ${NANO_DRIVE} >+gpart set -a active -i $PARTNUM ${NANO_DRIVE}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 160530
: 118309