Puisque vous vous connectez à l'appareil pour utiliser la CLI, le chargement décrit ci-dessus correspond en fait à un téléchargement. Procédez comme suit pour mettre à jour le logiciel d'un contrôleur simple à l'aide de la CLI.
dory:maintenance system updates> download
dory:maintenance system updates download (uncommitted)> get
url = (unset)
user = (unset)
password = (unset)
dory:maintenance system updates download (uncommitted)> set url=
ftp://foo/update.pkg.gz
url = ftp://foo/update.pkg.gz
dory:maintenance system updates download (uncommitted)> set user=bmc
user = bmc
dory:maintenance system updates download (uncommitted)> set password
Enter password:
password = ********
dory:maintenance system updates download (uncommitted)> commit
Transferred 157M of 484M (32.3%) ...
dory:maintenance system updates download (uncommitted)> commit Transferred 484M of 484M (100%) ... done Unpacking ... done dory:maintenance system updates> list UPDATE DATE STATUS ak-nas@2009.10.14,1-0-nd 2009-10-14 08:45 AKUP_WAITING ...
A partir de ce contexte, vous pouvez définir n'importe quelle propriété spécifique à la mise à jour, y compris l'application de mises à jour différées. Pour obtenir plus d'informations sur les propriétés disponibles pour cette mise à jour particulière, exécutez la commande help properties. Les propriétés pouvant être contrôlées par l'utilisateur débutent par le préfixe update_ :
clownfish:maintenance system updates ak-nas@2009.04.03,1-0> help properties
Properties that are valid in this context:
version => Update media version
date => Update release date
status => Update media status
update_zfs_upgrade => Apply incompatible storage pool update
clownfish:maintenance system updates ak-nas@2009.04.03,1-0> get
version = 2009.04.03,1-0
date = 2009-4-3 08:45:01
status = AKUP_WAITING
update_zfs_upgrade = deferred
clownfish:maintenance system updates ak-nas@2009.04.03,1-0> set update_zfs_upgrade=onreboot
update_zfs_upgrade = onreboot
clownfish:maintenance system updates ak-nas@2009.04.03,1-0>
Après avoir défini les propriétés, exécutez la commande upgrade. Vous êtes invité à confirmer et, si votre réponse est positive, la mise à jour débute :
dory:maintenance system updates> select ak-nas@2009.10.14,1-0-nd dory:maintenance system updates ak-nas@2009.10.14,1-0-nd> upgrade The selected software update requires a system reboot in order to take effect. The system will automatically reboot at the end of the update process. The update will take several minutes. At any time during this process, you can cancel the update with [Control-C]. Are you sure? (Y/N) y Updating from ... ak/nas@2009.10.11,1-0 Backing up smf(5) ... done. Loading media metadata ... done. Selecting alternate product ... SUNW,iwashi Installing Sun Storage 7120 2009.10.14,1-0 pkg://sun.com/ak/SUNW,iwashi@2009.10.14,1-0:20091014T084500Z Creating system/boot/ak-nas-2009.10.14_1-0 ... done. Creating system/root/ak-nas-2009.10.14_1-0 ... done. ...
Au fur et à mesure de la progression de la mise à niveau, le message le plus récent est affiché. Vous pouvez annuler la mise à niveau à tout moment en appuyant sur ^C, auquel cas vous êtes invité à confirmer l'annulation :
Updating from ... ak/nas@2009.10.11,1-0 Backing up smf(5) ... done. Loading media metadata ... ^C This will cancel the current update. Are you sure? (Y/N) y error: interrupted by user dory:maintenance system updates ak-nas@2009.10.14,1-0-nd>