Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/sh -x
- iscsiadm -m discovery -t st -p 192.168.101.100
- echo "node.session.auth.username = ausername" >> /etc/iscsi/nodes/iqn.2010-01.com.example:\storage.authenticated/192.168.101.100\,3260\,1/default
- echo "node.session.auth.password = apassword" >> /etc/iscsi/nodes/iqn.2010-01.com.example:\storage.authenticated/192.168.101.100\,3260\,1/default
- iscsiadm -m node --targetname "iqn.2010-01.com.example:storage.authenticated" --portal "192.168.101.100:3260" --login
- mkdir -p /target
- mount /dev/sdb1 /target
- cp /target/boot/initrd.img-* /var/lib/tftpboot/initrd-authenticated.img
- cp /target/boot/vmlinuz-* /var/lib/tftpboot/vmlinuz-authenticated
- umount /target
- iscsiadm -m node --targetname "iqn.2010-01.com.example:storage.authenticated" --portal "192.168.101.100:3260" --logout
Add Comment
Please, Sign In to add comment