|
52章上完第17章:1Z0-053的19章。
bmf:
bwmf:
bumf:
- #!/bin/sh
- . /usr/lib/botang-func
- sub_confirm "Please input the mount point full path: ?"
- ls -l $SUBCON1* || exit
-
- for i in {0..9}
- do
- VBO=`find $SUBCON1 -name "*.loop$i"`
- if [ ! -z $VBO ]
- then
- sub_answer "Decrypt $VBO:(y/n)? "
- if [ $SUBANS == 'y' ]
- then
- # umount /container/loop$i
- umount /file/loop$i
- cryptsetup luksClose loop$i
- losetup -d /dev/loop$i
- losetup /dev/loop$i 2>/dev/null
- fi
- fi
- done
- df -h
- sleep 2
- ls -l /dev/mapper/
复制代码
botang-create-luks:
- #!/bin/sh
- . /usr/lib/botang-func
- read -p "File: " v_file
- sub_answer "DD? "
- if [ $SUBANS == y ]
- then
- read -p "SIZE(M): " v_size
- dd if=/dev/zero of=$v_file bs=4M count=$[ $v_size/4 ]
- fi
- for i in {0..9}
- do
- losetup /dev/loop$i
- done
- read -p "Loop(0-9): " v_loop
- losetup /dev/loop$v_loop $v_file
- cryptsetup luksFormat /dev/loop$v_loop
- sub_answer "EXT4? "
- if [ $SUBANS == y ]
- then
- cryptsetup luksOpen /dev/loop$v_loop loop$v_loop
- mkfs.ext4 /dev/mapper/loop$v_loop
- fi
复制代码
botang-func:
|
|