malfs mekanizma guncelleme
This commit is contained in:
		
							parent
							
								
									ccbb145733
								
							
						
					
					
						commit
						c66d1480c6
					
				
					 5 changed files with 73 additions and 7 deletions
				
			
		
							
								
								
									
										68
									
								
								bin/mps
									
										
									
									
									
								
							
							
						
						
									
										68
									
								
								bin/mps
									
										
									
									
									
								
							| 
						 | 
				
			
			@ -4,7 +4,7 @@
 | 
			
		|||
versiyon="0.1"
 | 
			
		||||
iletisim="milisarge@gmail.com"
 | 
			
		||||
paketdepo="/depo/paketler/"
 | 
			
		||||
sunucu="192.168.3.193:8000/paketdepo/"
 | 
			
		||||
sunucu="192.168.3.193:8000/MPS/"
 | 
			
		||||
git_sunucu="https://github.com/milisarge/malfs-milis"
 | 
			
		||||
ikaynak=""
 | 
			
		||||
betikad=${0##*/}
 | 
			
		||||
| 
						 | 
				
			
			@ -55,6 +55,46 @@ icerik_ekle(){
 | 
			
		|||
	ryaz 34 $paketad" paketi kuruldu."
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
icerik_ekle2(){
 | 
			
		||||
	kokdizin=/mnt/lfs
 | 
			
		||||
	paketad=`echo "$1" | cut -d'#' -f1`	
 | 
			
		||||
	paketad=`basename $paketad`
 | 
			
		||||
	ryaz 34 $paketad" paketi kuruluyor."
 | 
			
		||||
	tar -C /tmp --extract --file=$1 .PRE 1 2> /tmp/$paketad_pre.log
 | 
			
		||||
	#kos-kur kontrolu
 | 
			
		||||
	if [ -f /tmp/.PRE ];then
 | 
			
		||||
		bash  /tmp/.PRE
 | 
			
		||||
		rm  /tmp/.PRE
 | 
			
		||||
	fi
 | 
			
		||||
	mkdir -p tmpk.$paketad
 | 
			
		||||
	tar xf $1 -C tmpk.$paketad  &&
 | 
			
		||||
	mkdir -p $kokdizin/var/lib/pkg/DB/"$paketad" &&
 | 
			
		||||
	cp -avf tmpk.$paketad/* $kokdizin > tmpk.$paketad/kurulan &&
 | 
			
		||||
	cat tmpk.$paketad/kurulan | cut -d '>' -f2 > $kokdizin/var/lib/pkg/DB/"$paketad"/kurulan
 | 
			
		||||
	#mv  tmpk.$paketad/.MTREE /var/lib/pkg/DB/"$paketad"/files &&
 | 
			
		||||
	mv  tmpk.$paketad/.META $kokdizin/var/lib/pkg/DB/"$paketad"/META &&
 | 
			
		||||
	
 | 
			
		||||
	#kur-kos calistirilmasi
 | 
			
		||||
	if [ -f tmpk.$paketad/.POST ];then
 | 
			
		||||
		bash  tmpk.$paketad/.POST
 | 
			
		||||
		rm  tmpk.$paketad/.POST
 | 
			
		||||
	fi
 | 
			
		||||
	#if [ -f $kokdizin.PRE ];then
 | 
			
		||||
	#	rm  $kokdizin.PRE
 | 
			
		||||
	#fi
 | 
			
		||||
	#if [ -f $kokdizin/.okubeni ];then
 | 
			
		||||
	#	rm  $kokdizin/.okubeni
 | 
			
		||||
	#fi
 | 
			
		||||
	#if [ -f $kokdizin/.README ];then
 | 
			
		||||
	#	rm  $kokdizin/.README
 | 
			
		||||
	#fi
 | 
			
		||||
	rm -r tmpk.$paketad
 | 
			
		||||
	if [ -f /etc/ld.so.conf ];then
 | 
			
		||||
		ldconfig
 | 
			
		||||
	fi
 | 
			
		||||
	ryaz 34 $paketad" paketi kuruldu."
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
paket_siles(){
 | 
			
		||||
	local paket kkont sil_onay
 | 
			
		||||
	if [ -f $dokunulmaz ];then
 | 
			
		||||
| 
						 | 
				
			
			@ -202,6 +242,16 @@ paket_kur_oto(){
 | 
			
		|||
	done
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
paket_kur_liste(){
 | 
			
		||||
	local kpkt pkt pak
 | 
			
		||||
	for kpkt in `cat $1`;do
 | 
			
		||||
		for pkt in `ls $kpkt* | cut -d'#' -f1`;do
 | 
			
		||||
			pak=`ls "$pkt#"*`
 | 
			
		||||
			mps -k2 "$pak"
 | 
			
		||||
		done
 | 
			
		||||
	done
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
#otomatik derle kontrollu kur
 | 
			
		||||
paket_kur_oto2(){
 | 
			
		||||
	mps -dly "$1" > /dev/null && mps -ok genel.derleme.liste
 | 
			
		||||
| 
						 | 
				
			
			@ -484,6 +534,8 @@ ayarlar() {
 | 
			
		|||
				ikaynak="ag" ;;
 | 
			
		||||
			-k|--yrku)
 | 
			
		||||
				ikaynak="yerel" ;;
 | 
			
		||||
			-k2|--yrku2)
 | 
			
		||||
				ikaynak="yerel2" ;;
 | 
			
		||||
			-sil|--pksl)
 | 
			
		||||
				paket_siles "$2" ;;
 | 
			
		||||
			-s|--pksil)
 | 
			
		||||
| 
						 | 
				
			
			@ -504,6 +556,8 @@ ayarlar() {
 | 
			
		|||
				paket_derle_oto2 "$2" ;;	
 | 
			
		||||
			-ok|--pkok)
 | 
			
		||||
				paket_kur_oto "$2" ;;
 | 
			
		||||
			-okl|--pkokl)
 | 
			
		||||
				paket_kur_liste "$2" ;;
 | 
			
		||||
			-ko|--pkko)
 | 
			
		||||
				paket_kur_oto2 "$2" ;;		
 | 
			
		||||
			-os|--pkos)
 | 
			
		||||
| 
						 | 
				
			
			@ -653,6 +707,18 @@ if [ "$ikaynak" = "yerel" ]; then
 | 
			
		|||
	fi
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
if [ "$ikaynak" = "yerel2" ]; then
 | 
			
		||||
	local silme
 | 
			
		||||
	pkontrol=`basename $2 | grep -w "mps.lz"`
 | 
			
		||||
	if [ ! -z "$pkontrol" -a "$pkontrol" != "" ]; then
 | 
			
		||||
		paketad=`echo "$2" | cut -d'#' -f1`	
 | 
			
		||||
		kkont=`kurulu_kontrol "$paketad"`
 | 
			
		||||
		icerik_ekle2 "$2"
 | 
			
		||||
	else
 | 
			
		||||
		ryaz 31 "yerelde mps paketi bulunamadı."
 | 
			
		||||
	fi
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
ana "$@"
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -149,7 +149,6 @@ ikinci_ayarlar(){
 | 
			
		|||
	generate_milis_version
 | 
			
		||||
	cp $ANADIZIN/ayarlar/mpsd.conf $LFS/etc/
 | 
			
		||||
	cp $ANADIZIN/ayarlar/onmpsd.conf $LFS/etc/
 | 
			
		||||
	cp $ANADIZIN/ayarlar/dokunulmaz $LFS/etc/
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
generate_milis_version() {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										5
									
								
								rootfs_yapmak
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										5
									
								
								rootfs_yapmak
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,5 @@
 | 
			
		|||
ikili paketleri kullanarak rootfs(temel sistem) yapmak için:
 | 
			
		||||
 | 
			
		||||
mps -okl temel.paket.liste
 | 
			
		||||
ldconfig -r /mnt/lfs
 | 
			
		||||
chroot /mnt/lfs
 | 
			
		||||
| 
						 | 
				
			
			@ -3,7 +3,3 @@ if [ -f etc/ssl/ca-bundle.crt ]; then
 | 
			
		|||
	rm etc/ssl/certs/*.0
 | 
			
		||||
	rm etc/ssl/certs/*.pem
 | 
			
		||||
fi
 | 
			
		||||
if ! ( grep ssl /etc/dokunulmaz > /dev/null);then
 | 
			
		||||
	echo "etc/ssl" >> /etc/dokunulmaz
 | 
			
		||||
        echo "etc/ssl/certs" >> /etc/dokunulmaz
 | 
			
		||||
fi
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1 +1 @@
 | 
			
		|||
usr/sbin/update-pciids
 | 
			
		||||
/usr/sbin/update-pciids
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		
		Reference in a new issue