moving custom hooks to systemd

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



Hello list,

I tried booting with systemd and two custom hooks I have that create the /var directory on tmpfs didn't work. Google doesn't help here and my experience with systemd is in its infancy, so is there specific action I should take?

My custom hooks are set to run during sysinit_postmount and shutdown_preumount, see attached file for full source.


Thanks in advance,
Dimitris
function varsync_start ()
{
	# Assuming that we mounted /var as tmpfs in the previous step
	stat_busy "Rsyncing /var-sync/ to /var/"
	/usr/bin/rsync -ax /var-sync/ /var/
	stat_done
}

function varsync_stop ()
{
	# saving the /var filesystem from the tmpfs
	echo -e 'y\ny' | /usr/bin/pacman -Scc >/dev/null
	stat_busy "Rsyncing /var/ to /var-sync/"
	/usr/bin/rsync -ax --delete /var/ /var-sync/
	stat_done
}

add_hook sysinit_postmount varsync_start
add_hook shutdown_preumount varsync_stop

[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux