View Single Post
Moderator | Posts: 6,215 | Thanked: 6,400 times | Joined on Nov 2011
#77
coderus,

What would be the difference between using sh and perl script based on rainisto's post in the swap thread:

Code:
RM696-21-3_PR_001:/# export A=`sha1sum /tmp/enable-swap.conf |cut -b1-40`;
RM696-21-3_PR_001:/# perl -pi -w -e 's#40 (.*) A(.*)enable-swap#40 $ENV{A} A$2enable-swap#smg' /var/lib/aegis/refhashlist
RM696-21-3_PR_001:/# accli -c tcb-sign -F /var/lib/aegis/refhashlist -i /var/lib/aegis/refhashlist
RM696-21-3_PR_001:/# validator-init; aegis-loader;echo 1 > /sys/kernel/security/validator/flush
RM696-21-3_PR_001:~# reboot