Using generic Seagate disks with NetApp Redux

Update 2010-06-08: After a while someone at livejournal got back to me, and provided more information about what happened with regards to suspension of my posts. They got nailed with a DMCA takedown notice by lawyer on retainer of NetApp Inc, with which they had to comply. They did send me a scan of the notice.

I am a Russian citizen, I do not reside in USA, and frankly I don't give a fuck about DMCA. As a result, I moved all suspended content to a different hoster, where hopefully DMCA will not be enforceable.

And yes, I apologize for all the ads there. Please install adblock plug-in for Firefox, it will make your life much happier.

Using generic Seagate disks with NetApp
Converting NearStore R100 to NetApp F880
NetApp R100 - overview
NetApp env_exception license
Is FAS940c a decent one?

Feel free to post your comments these posts in this thread. I do not keep track of IPs/usernames of the posters (Livejournal does, though), and only pre-moderate the comments.

What to do in Manchester?

Going to Manchester for 4 days for work. Hope that will have an afternoon free one day. Besides the tour of the BBC Studios (and iTV Coronation Street set), and the soccer stadium for Manchester United, what do you think is the must see there?

Что стоит посмотреть в Манчестере? По работе, буду там несколько дней, и, возможно, в последний день закончу рано, и будет возможность что-то посмотреть. Знаю, что есть туры студий БиБиСи, есть тур стадиона, где Манчестер Юнайтед играет, а кроме этого?

仕事に英国のマンチェスタに行きます。暇時間が少ないけど、最後の日午前に終わったら、少し目学の時間の可能性が高いです。 マンチェスタに何を目なきゃならにいですか。
  • Current Mood
    pensive pensive

ZFS - fragmentation between Oracle Solaris and OpenZFS implementation

Once Oracle bought Sun, and SXCE builds stopped, since I had no Solaris support, I switched to using OpenIndiana, and OpenIndiana worked well for the purpose of a fileserver.

Over the last 3 or 4 years, I pretty much stopped dealing with Solaris: Solaris is no-longer used at work, and being constantly busy, I pretty much left my OpenIndiana appliance to itself.

Yesterday I have tried to give Solaris 11.3 a go, primarily, because I am considering USB 3.0 support, that is not present in OpenIndiana, and, allegedly, present in Oracle Solaris 11.3.

What I found, is that Solaris 11.3 implementation of ZFS, with zpool version 37 and zfs version 6, is not compatible with OpenZFS implementation, that is present in OpenIndiana and that was ported to a handful of OSes. So ZFS have fragmented.

Of course, OpenZFS supports zpool version 28, and zfs version 5, however OpenZFS implemented the features capability, that is not present in Solaris ZFS, and presents Solaris 11.3 from mounting the pool.

Collapse )

oikaze:~ user$ ssh user@192.168.1.133
The authenticity of host '192.168.1.133 (192.168.1.133)' can't be established.
RSA key fingerprint is f2:17:ad:77:a8:b6:f2:a9:c7:a6:1c:15:45:7f:63:ad.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '192.168.1.133' (RSA) to the list of known hosts.
Password: 
Warning: 1 failed authentication attempt at Tue Dec 30 19:00 1969 since last successful authentication.

Last login: Sun Jan 31 16:25:35 2016 from lowram
Oracle Corporation      SunOS 5.11      11.3    September 2015
user@lowram:~$ uname -a
SunOS lowram 5.11 11.3 i86pc i386 i86pc
user@lowram:~$ pkg list entire
NAME (PUBLISHER)                                  VERSION                    IFO
entire                                            0.5.11-0.175.3.1.0.5.0     i--
user@lowram:~$ zpool upgrade -v 
This system is currently running ZFS pool version 37.

The following versions are supported:

VER  DESCRIPTION
---  --------------------------------------------------------
 1   Initial ZFS version
 2   Ditto blocks (replicated metadata)
 3   Hot spares and double parity RAID-Z
 4   zpool history
 5   Compression using the gzip algorithm
 6   bootfs pool property
 7   Separate intent log devices
 8   Delegated administration
 9   refquota and refreservation properties
 10  Cache devices
 11  Improved scrub performance
 12  Snapshot properties
 13  snapused property
 14  passthrough-x aclinherit
 15  user/group space accounting
 16  stmf property support
 17  Triple-parity RAID-Z
 18  Snapshot user holds
 19  Log device removal
 20  Compression using zle (zero-length encoding)
 21  Deduplication
 22  Received properties
 23  Slim ZIL
 24  System attributes
 25  Improved scrub stats
 26  Improved snapshot deletion performance
 27  Improved snapshot creation performance
 28  Multiple vdev replacements
 29  RAID-Z/mirror hybrid allocator
 30  Encryption
 31  Improved 'zfs list' performance
 32  One MB blocksize
 33  Improved share support
 34  Sharing with inheritance
 35  Sequential resilver
 36  Efficient log block allocation
 37  lz4 compression
For more information on a particular version, including supported releases,
see the ZFS Administration Guide.

user@lowram:~$ 
user@lowram:~$ zfs upgrade -v 
The following filesystem versions are supported:

VER  DESCRIPTION
---  --------------------------------------------------------
 1   Initial ZFS filesystem version
 2   Enhanced directory entries
 3   Case insensitive and SMB credentials support
 4   userquota, groupquota properties
 5   System attributes
 6   Multilevel file system support

For more information on a particular version, including supported releases,
see the ZFS Administration Guide. 

user@lowram:~$ zpool get all rpool
NAME   PROPERTY       VALUE                 SOURCE
rpool  allocated      15.2G                 -
rpool  altroot        -                     default
rpool  autoexpand     off                   default
rpool  autoreplace    off                   default
rpool  bootfs         rpool/ROOT/solaris    local
rpool  cachefile      -                     default
rpool  capacity       20%                   -
rpool  dedupditto     0                     default
rpool  dedupratio     1.00x                 -
rpool  delegation     on                    default
rpool  failmode       wait                  default
rpool  free           58.8G                 -
rpool  guid           14887643662198180863  -
rpool  health         ONLINE                -
rpool  listshares     off                   default
rpool  listsnapshots  off                   default
rpool  readonly       off                   -
rpool  size           74G                   -
rpool  version        37                    default
user@lowram:~$ 


root@lowram:~# zpool import
  pool: braid
    id: 15034220794564382665
 state: UNAVAIL
status: The pool is formatted using an incompatible version.
action: The pool cannot be imported.  Access the pool on a system running newer
        software, or recreate the pool from backup.
   see: http://support.oracle.com/msg/ZFS-8000-A5
config:

        braid       UNAVAIL  newer version
          raidz1-0  ONLINE
            c4t0d0  ONLINE
            c4t0d1  ONLINE
            c4t0d2  ONLINE
            c4t0d3  ONLINE

device details:


  pool: brow
    id: 4216305602539210323
 state: UNAVAIL
status: The pool is formatted using an incompatible version.
action: The pool cannot be imported.  Access the pool on a system running newer
        software, or recreate the pool from backup.
   see: http://support.oracle.com/msg/ZFS-8000-A5
config:

        brow        UNAVAIL  newer version
          raidz1-0  ONLINE
            c3t0d0  ONLINE
            c3t0d1  ONLINE
            c3t0d2  ONLINE
            c3t0d3  ONLINE

device details:


  pool: test
    id: 6602978468318297097
 state: UNAVAIL
status: One or more devices are unavailable.
action: The pool cannot be imported due to unavailable devices or data.
config:

        test      UNAVAIL  insufficient replicas
          c2t0d0  UNAVAIL  corrupted data

device details:

        c2t0d0  UNAVAIL           corrupted data
        status: ZFS detected errors on this device.
                The device has invalid label.


user@lowram:~$ 


and here is comparison with OpenIndiana (not the latest, but still a good indicator):

oikaze:download user$ ssh user@192.168.1.209
Password: 
Last login: Mon Feb  1 05:09:25 2016
OpenIndiana (powered by illumos)    SunOS 5.11    oi_151a9    November 2013
user@smalldisk:~$ uname -a
SunOS smalldisk 5.11 oi_151a9 i86pc i386 i86pc Solaris
user@smalldisk:~$ pkg list entire
NAME (PUBLISHER)                                  VERSION                    IFO
entire                                            0.5.11-0.151.1.9           i--
user@smalldisk:~$ zpool upgrade -v
This system supports ZFS pool feature flags.

The following features are supported:

FEAT DESCRIPTION
-------------------------------------------------------------
async_destroy                         (read-only compatible)
     Destroy filesystems asynchronously.
empty_bpobj                           (read-only compatible)
     Snapshots use less space.
lz4_compress                         
     LZ4 compression algorithm support.
multi_vdev_crash_dump                
     Crash dumps to multiple vdev pools.

The following legacy versions are also supported:

VER  DESCRIPTION
---  --------------------------------------------------------
 1   Initial ZFS version
 2   Ditto blocks (replicated metadata)
 3   Hot spares and double parity RAID-Z
 4   zpool history
 5   Compression using the gzip algorithm
 6   bootfs pool property
 7   Separate intent log devices
 8   Delegated administration
 9   refquota and refreservation properties
 10  Cache devices
 11  Improved scrub performance
 12  Snapshot properties
 13  snapused property
 14  passthrough-x aclinherit
 15  user/group space accounting
 16  stmf property support
 17  Triple-parity RAID-Z
 18  Snapshot user holds
 19  Log device removal
 20  Compression using zle (zero-length encoding)
 21  Deduplication
 22  Received properties
 23  Slim ZIL
 24  System attributes
 25  Improved scrub stats
 26  Improved snapshot deletion performance
 27  Improved snapshot creation performance
 28  Multiple vdev replacements

For more information on a particular version, including supported releases,
see the ZFS Administration Guide.

user@smalldisk:~$ zfs upgrade -v
The following filesystem versions are supported:

VER  DESCRIPTION
---  --------------------------------------------------------
 1   Initial ZFS filesystem version
 2   Enhanced directory entries
 3   Case insensitive and filesystem user identifier (FUID)
 4   userquota, groupquota properties
 5   System attributes

For more information on a particular version, including supported releases,
see the ZFS Administration Guide.

user@smalldisk:~$ zpool list
NAME    SIZE  ALLOC   FREE  EXPANDSZ    CAP  DEDUP  HEALTH  ALTROOT
braid  10.9T  10.2T   648G         -    94%  1.00x  ONLINE  -
brow   10.9T  7.19T  3.68T         -    66%  1.00x  ONLINE  -
rpool   464G  8.11G   456G         -     1%  1.00x  ONLINE  -
user@smalldisk:~$ zpool get all rpool
NAME   PROPERTY                       VALUE                          SOURCE
rpool  size                           464G                           -
rpool  capacity                       1%                             -
rpool  altroot                        -                              default
rpool  health                         ONLINE                         -
rpool  guid                           3801163999201930205            default
rpool  version                        -                              default
rpool  bootfs                         rpool/ROOT/openindiana-2       local
rpool  delegation                     on                             default
rpool  autoreplace                    off                            default
rpool  cachefile                      -                              default
rpool  failmode                       wait                           default
rpool  listsnapshots                  off                            default
rpool  autoexpand                     off                            default
rpool  dedupditto                     0                              default
rpool  dedupratio                     1.00x                          -
rpool  free                           456G                           -
rpool  allocated                      8.11G                          -
rpool  readonly                       off                            -
rpool  comment                        -                              default
rpool  expandsize                     0                              -
rpool  freeing                        0                              default
rpool  feature@async_destroy          enabled                        local
rpool  feature@empty_bpobj            active                         local
rpool  feature@lz4_compress           enabled                        local
rpool  feature@multi_vdev_crash_dump  disabled                       local
user@smalldisk:~$ sudo /bin/bash
root@smalldisk:/home/user# zpool status 
  pool: braid
 state: ONLINE
status: Some supported features are not enabled on the pool. The pool can
        still be used, but some features are unavailable.
action: Enable all features using 'zpool upgrade'. Once this is done,
        the pool may no longer be accessible by software that does not support
        the features. See zpool-features(5) for details.
  scan: scrub repaired 0 in 111h12m with 0 errors on Fri Jan 24 18:19:38 2014
config:

        NAME        STATE     READ WRITE CKSUM
        braid       ONLINE       0     0     0
          raidz1-0  ONLINE       0     0     0
            c5t0d0  ONLINE       0     0     0
            c5t0d1  ONLINE       0     0     0
            c5t0d2  ONLINE       0     0     0
            c5t0d3  ONLINE       0     0     0

errors: No known data errors

  pool: brow
 state: ONLINE
  scan: scrub canceled on Wed Feb  5 09:23:18 2014
config:

        NAME        STATE     READ WRITE CKSUM
        brow        ONLINE       0     0     0
          raidz1-0  ONLINE       0     0     0
            c4t0d0  ONLINE       0     0     0
            c4t0d1  ONLINE       0     0     0
            c4t0d2  ONLINE       0     0     0
            c4t0d3  ONLINE       0     0     0

errors: No known data errors

  pool: rpool
 state: ONLINE
status: Some supported features are not enabled on the pool. The pool can
        still be used, but some features are unavailable.
action: Enable all features using 'zpool upgrade'. Once this is done,
        the pool may no longer be accessible by software that does not support
        the features. See zpool-features(5) for details.
  scan: none requested
config:

        NAME        STATE     READ WRITE CKSUM
        rpool       ONLINE       0     0     0
          c0d1s0    ONLINE       0     0     0

errors: No known data errors
root@smalldisk:/home/user# zpool get all brow
NAME  PROPERTY                       VALUE                          SOURCE
brow  size                           10.9T                          -
brow  capacity                       66%                            -
brow  altroot                        -                              default
brow  health                         ONLINE                         -
brow  guid                           4216305602539210323            default
brow  version                        -                              default
brow  bootfs                         -                              default
brow  delegation                     on                             default
brow  autoreplace                    off                            default
brow  cachefile                      -                              default
brow  failmode                       wait                           default
brow  listsnapshots                  off                            default
brow  autoexpand                     off                            default
brow  dedupditto                     0                              default
brow  dedupratio                     1.00x                          -
brow  free                           3.68T                          -
brow  allocated                      7.19T                          -
brow  readonly                       off                            -
brow  comment                        -                              default
brow  expandsize                     0                              -
brow  freeing                        0                              default
brow  feature@async_destroy          enabled                        local
brow  feature@empty_bpobj            active                         local
brow  feature@lz4_compress           enabled                        local
brow  feature@multi_vdev_crash_dump  enabled                        local
You have new mail in /var/mail/root
root@smalldisk:/home/user# 
  • Current Music
    위치스 - 떳다! 그녀!!

xpdf 3.04 and password protected PDFs / xpdf 3.04 и зашифрованные PDF файлы

For what it's worth, the old patch for xpdf 3.0 still works with version 3.04 with minimal modifications.

All it does, is ignores the settings of the owner password is the user password is not set, allowing one to print or convert PDF file to text, PostScript file, etc.

Старый патч для xpdf 3.0 без особых проблем продолжает работать с xpdf 3.04, и позволяет печатать или конвертировать PDF файлы у которых стоит пароль владельца, но нет пароля для пользователя.

--- xpdf-3.04/xpdf/XRef.cc.bak 2014-09-17 13:29:34.000000000 -0400
+++ xpdf-3.04/xpdf/XRef.cc 2014-09-17 13:47:07.000000000 -0400
@@ -958,19 +958,19 @@
 }
 
 GBool XRef::okToPrint(GBool ignoreOwnerPW) {
-  return (!ignoreOwnerPW && ownerPasswordOk) || (permFlags & permPrint);
+  return gTrue;
 }
 
 GBool XRef::okToChange(GBool ignoreOwnerPW) {
-  return (!ignoreOwnerPW && ownerPasswordOk) || (permFlags & permChange);
+  return gTrue;
 }
 
 GBool XRef::okToCopy(GBool ignoreOwnerPW) {
-  return (!ignoreOwnerPW && ownerPasswordOk) || (permFlags & permCopy);
+  return gTrue;
 }
 
 GBool XRef::okToAddNotes(GBool ignoreOwnerPW) {
-  return (!ignoreOwnerPW && ownerPasswordOk) || (permFlags & permNotes);
+  return gTrue;
 }
 
 Object *XRef::fetch(int num, int gen, Object *obj, int recursion) {

Борьба с жарой

Так как в Москве нестерпимая жара, хочу поделиться маленькой хитростю которую я лет двадцать назад, будуче в Израиле проездом из Москвы в Жмеринку, подсмотрел у абориген Израиля.

В Израиле тоже жара, по крайней мере несколько месяцев в году, особенно в пустыне Негев что на юге страны. Но израильтяне хитрые, и спасаются от этого дела тем, что берут пластиковые бутылочки с питевой водой (обычно на пол литра - литр), и бросают на ночь в морозильник. На утро всё содержимое бутылки замерзает в камень. У большинства рюгзаков которые в Израиле продаются имеется боковой карман как раз под бутылку.

Ну так вот, аборигены кладут свою ледяную бутылку в кармашек, и спокойно идут по своим делам. Вода в бутылке начинает таить. Поскольку бутылка в выносном кармане, то обраующийся конденсат не портит содержимое холодильника, а абориген в течение часа - двух, пока лёд в бутылке весь не растаит или не вода не закончится, имеет в наличие у себя ледяную воду.

Бутылка под это дело, понятно что должна быть пластиковая. Сетклянную может разорвать. Наливать бутылку полную воды тоже не надо - я оставляю где-то два пальца от верха. Пластиковую бутылку которая налита под завязку, скорее всего не разорвёт, однако когда лёд подтаит и бутылку откроете, вода хлынет через край.

Для себя я делаю следующие две модернизации Израильского фокуса:

В воду я добавляю лимон. В зависимосте от размера бутылки и лимона, от целого лимона на бутыль в 1.5 литра, до нескольких кружёчков на бутылку в 0.5 литра. Лимон я режу кубиками, с коркой. Знакомые подмешивают вместо лимона давленную бруснику.

Бутылок у меня две - одна на работе, одна дома. Домашную "заряжаю" на ночь, и с утра у меня есть с чем ехать на работу. По приходу на работу опустевшую бутылку "заряжаю" опять, и бросаю в морозильник на работе. Вторая бутылка на работе, её я беру с собой вечером при обратной поездке, и "заряжаю" дома перед сном. Так что бутылки путешевствуют туда-сюда, а у меня есть с собой холодненькое.
  • Current Music
    Сергей Наговицын - Прохор Митрич

Netgear GS724T v3 switch - VLANs and serial port

Начальство одного из обектов решило сэкономить и закупило Netgear GS724Tv3 switch. Этот коммутатор достаточно глючный. Моя рекоммендация не покупать - будете плеваться.

At one of the sites that I look after, management decided to save some money, and bought a Netgear GS724Tv3 gigabit switch.

Please don't do that. It's a piece of shit switch that will cause you headaches if your needs are in any way advanced.

First of all, if you need VLANs, don't buy this switch - Netgear will charge you extra for support of VLANs, since it's a premium service.

If you actually need support with VLANs, one way to deal with this, is to call, ask for VLAN support, be told that it's extra fee service, at which point ask for the RMA number. Tell them that the box tells that the switch supports VLANs, but since you follow instructions, and the VLANs do not work, the switch must obviously be defective, and you would like it replaced. At which point Netgear support will tell you that they will have to test that the switch is in fact defective, and will escalate to someone with a clue.

I talked to a second level tech, named Jake, agent ID 5703. Jake has a clue. Jake has lots of clues. Be level with him, tell him what you're trying to do, and why you ended up escalated to him, and he will help.


For the reference, if you want to put the management VLAN on a different VLAN then 1, here is what you have to do:

  • Create a new VLAN

  • Add ports to the new VLAN, remove them from default VLAN, and save

  • Go to the trunking menu (same sub-menu as VLANs), and give the ports on the new VLAN different ID then the ports on the default VLAN

  • Go to the management IP menu, and change the management IP VLAN


Without the boldened step you will lock yourself out of the switch and need to do a factory reset. For what it's worth, the default IP the switch self-assigns if it can't find a DHCP server on the network is 192.168.0.239.

Now, Netgear GS724T v3 has a serial port inside, and a command line interface. You can verify that the CLI exists by looking at the logs. You can pull the switch apart, and you will see the serial port header (10 pin) at position J1. Problem is that it doesn't have the MAX232 chip and some resistors in position U2 and similar, so you won't get a signal if you hook up a serial header to it. Basically same idea as with some models of WRT54G and similar - need to take a file tweak the thing by hand to get it to work.

I didn't bother soldering the MAX232 on, and experimenting with resistors (although if you do, please post and comment) and just returned the thing - it had issues with multiple VLANs besides the issue I documented above.
  • Current Music
    Запрещенные Барабанщики - 11 Пока убийцы ходят по земле.mp3
  • Tags
    ,

Михаил Кочетков - Гусарская Песня

Последнее время часто слушаю записи Михаила Кочеткова. Кочетков он... разный. У него есть песни о непризнанном и нереализованном гение (На 20 лет совместной жизни с женой и каподастром, Грузинская автомобильная, итд), есть разные песенные виньетки которые трудно в полной мере заценить если вы не знакомы с человеком о ком это написано, есть песни о СССР...

Когда-то у меня на кассете была запись какой-то КСПшной попойки, где был и Михаил Николаевич. Помню что там было "Яблочко", а Кочетков исполнял тост "Давай мы жён с детьми отправим в Сочи..." и "Последнию мистерию". Плёнку эту, к сожалению, я профукал.

Сегодня зацепила вот эта "Гусарская Песня"

Вот бы маршалом родиться
Лет бы сто тому назад,
Можно б было порезвиться,
Сабелькою помахать.

Порубить бы вволю турков,
Ох, охота порубить,
А потом в степи на бурке
Так турчаночку любить!

Чтоб, Господи, Господи,
Жизнь казалась раем.
Не по плоской же плоскости -
Вечно мы по краю.

Collapse )

DMCA takedown of NetApp related posts

If you are one of the people wondering what happened to my NetApp related posts, here is your answer.

While I was away and traveling, I received the following e-mail:

From:	LiveJournal Abuse Prevention Team <abuse@livejournal.com>
To:	xxxxx@xxxxxx.xx
Date:	Fri, May 14, 2010 at 7:51 PM
Subject:	Your LiveJournal Account [89-1098415]
Mailed-by:	livejournal.com


Dear LiveJournal user vardomskiy,

We have received a report, properly formatted under the provisions set forth 
by United States law, indicating that the following entries violate the copyright of another:

http://vardomskiy.livejournal.com/863.html
http://vardomskiy.livejournal.com/2025.html
http://vardomskiy.livejournal.com/2225.html
http://vardomskiy.livejournal.com/2352.html
http://vardomskiy.livejournal.com/1702.html
http://vardomskiy.livejournal.com/2838.html

As such, we have suspended these entries.  If you feel that this report is in error or that 
your use of the material falls under one of the categories permitted under copyright law, 
you are entitled to file a counter-notification, also under the provisions of U.S. law; please 
contact us for information on how to do this. Filing a counter-notification indicates that you 
are willing to defend yourself in court against a charge of copyright infringement, and you 
may be bound by civil and possibly criminal penalties if you are found liable.

Regards,
Eric
LiveJournal Abuse Prevention Team


I am in contact with an attorney, and am investigating what my options are.

P.S. I do not grant permission for re-aggregation and re-distribution of this post (or any other of my posts) to the scammers at dmca-services.com or brokencontrollers.com. As far as I can tell, both of these sites are RSS scalpers who are interesting in making money off other peoples' plight.

iomega Prestige 1TB USB 2.0 3.5" Desktop drives

Маленькая заметка о разных версиях модели выносного твёрдого диска производства компании iomega. Ранняя версия работает с Solarisом, поздняя нет.

Just a quick note from my observations.

We bought a couple of iomega Prestige 1TB USB hard drives about a year ago.
The once I originally bought contain Seagate Barracuda 7200.12 disk, (ST31000528AS, disk made in China, site code is WU, datecode is 09356, firmware CC44) and the USB<->SATA chipset is JMicron JM20329, iomega PCB revision EC02-OW-10. (JM20329 seems to be similar to JMicron JM20339)

These disks work very well with Linux, Solaris and MacOS.

Recently I've RMAed to iomega one of these disks, and received a remanufactured replacement.
Remanufactured replacement contains identical disk, Seagate Baracuda 7200.12 ST3100528AS, but made in Taiwan (Site code TK, date code 10214, firmware is the same - CC44), but the USB <-> SATA chipset is SunplusIT SATALink SPIF301-HL237, iomega PCB revision EC02-015_10.

Collapse )
  • Current Music
    Александр Новиков - Вижу сон. Дорога черная...

wget script to download from SDLC

Quick shell script to download files that require authorization from Sunsolve/SDLC/Sun.com. Not mine, and I don't know where I found it in the first place.

Маленький скрипт для того чтобь списывать файлы с вебсайтов Sun'а (sunsolve.sun.com/SDLC/sun.com) для которых нужна авторизация. Требуется действительное имя пользователя и пароль, скрипт автоматизирует списывание с командной строки. Не мой, я уже не помню где я его откопал, но очень полезный.

#! /bin/sh

# wget user download-url filename

if [ $# -ne 3 ]; then 
    echo "Usage: $0 user_name download_url file_name"
    echo "  user_name     Use your Sun Online Account Username"
    echo "  download_url  The download link from the SDLC Download Page.  Must be enclosed in single quotes ('http://cds.sun.com/...')"
    echo "  file_name     Save the download using this file name"
    exit 1
fi

user=$1
dlurl=`echo $2 | sed -e 's/\?/%3f/g' -e 's/&/%26/g'`
filename=$3

stty -echo

echo "Password for ${user}: \c"; read password;

stty echo

#echo $dlurl

touch /tmp/wget-url-$$.txt
chmod 600 /tmp/wget-url-$$.txt

echo "https://identity.sun.com/amserver/UI/Login?program=cds&org=self_registered_users&IDToken1=${user}&IDToken2=${password}&goto=${dlurl}" >> /tmp/wget-url-$$.txt

wget  --no-check-certificate --keep-session-cookies  -O "${filename}" -i /tmp/wget-url-$$.txt

rm /tmp/wget-url-$$.txt

  • Current Music
    Червону руту не шукай вечорами - ти у мене єдина, тільки ти, повір
  • Tags