20fedorabook/pre-pivot.sh: don't create /usr/local mount by default
This commit is contained in:
		
							parent
							
								
									5cc7fabda1
								
							
						
					
					
						commit
						8f708e13bc
					
				
					 1 changed files with 3 additions and 9 deletions
				
			
		| 
						 | 
				
			
			@ -111,7 +111,7 @@ mkdir -p /run/initramfs/mnt
 | 
			
		|||
 | 
			
		||||
mount -o discard $datadev /run/initramfs/mnt || die "Failed to mount $datadev"
 | 
			
		||||
 | 
			
		||||
for i in var home cfg local; do
 | 
			
		||||
for i in var home cfg; do
 | 
			
		||||
    if ! [[ -d /run/initramfs/mnt/$i ]]; then
 | 
			
		||||
        mkdir /run/initramfs/mnt/$i
 | 
			
		||||
        FIRST_TIME=1
 | 
			
		||||
| 
						 | 
				
			
			@ -123,7 +123,8 @@ done
 | 
			
		|||
mount -o bind /run/initramfs/mnt/var   /sysroot/var
 | 
			
		||||
mount -o bind /run/initramfs/mnt/home  /sysroot/home
 | 
			
		||||
mount -o bind /run/initramfs/mnt/cfg   /sysroot/cfg
 | 
			
		||||
mount -o bind /run/initramfs/mnt/local /sysroot/usr/local
 | 
			
		||||
[[ -d /run/initramfs/mnt/local ]] \
 | 
			
		||||
    && mount -o bind /run/initramfs/mnt/local /sysroot/usr/local
 | 
			
		||||
umount -l /run/initramfs/mnt &>/dev/null
 | 
			
		||||
 | 
			
		||||
if [[ $FIRST_TIME ]]; then
 | 
			
		||||
| 
						 | 
				
			
			@ -133,13 +134,6 @@ if [[ $FIRST_TIME ]]; then
 | 
			
		|||
    mount -o bind /sys /sysroot/sys
 | 
			
		||||
    mount -t selinuxfs none /sysroot/sys/fs/selinux
 | 
			
		||||
 | 
			
		||||
#    if [ -f /etc/machine-id ]; then
 | 
			
		||||
#        cp /etc/machine-id /sysroot/cfg/machine-id
 | 
			
		||||
#    else
 | 
			
		||||
#        R=$(</proc/sys/kernel/random/uuid)
 | 
			
		||||
#        echo ${R//-} >/sysroot/cfg/machine-id
 | 
			
		||||
#    fi
 | 
			
		||||
 | 
			
		||||
    chroot /sysroot bash -c '
 | 
			
		||||
        /usr/sbin/load_policy -i
 | 
			
		||||
        /usr/sbin/setfiles -m -F -v \
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue